Changeset 393 for experimental
- Timestamp:
- Jun 30, 2012, 7:44:12 PM (12 years ago)
- Location:
- experimental/distortionNG
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
experimental/distortionNG/DistortionManipulator.cpp
r392 r393 517 517 void DistortionManipulator::updateDistortionSetup() 518 518 { 519 updateDistortionViewProjectionMatrix();519 //updateDistortionViewProjectionMatrix(); 520 520 updateDistortionMesh(); 521 521 _distortionSet->clearDirtyStatus(); … … 574 574 osg::Vec2 tmpTexCoords = osg::Vec2( tmpSrc.z()*_screenPixWidth, 575 575 tmpSrc.w()*_screenPixHeight ); 576 576 577 texCoords->push_back(tmpTexCoords); 577 578 //OSG_ALWAYS<<"Transfering texcoord vertex : X:"<<tmpTexCoords.x()<<" Y:"<<tmpTexCoords.y()<<std::endl; -
experimental/distortionNG/DistortionSetupStrategyProjectSyntropy.cpp
r391 r393 412 412 } 413 413 414 #if 0414 #if 1 415 415 for (osg::Vec4Array::iterator it = distortionMesh->begin(); it != distortionMesh->end(); ++it) 416 416 { … … 421 421 422 422 distortionSet->setDistortionMesh(distortionMesh); 423 distortionSet->setDistortionMeshColumns(distortionMeshColumns); 424 distortionSet->setDistortionMeshRows(distortionMeshRows); 423 //distortionSet->setDistortionMeshColumns(distortionMeshColumns); 424 //distortionSet->setDistortionMeshRows(distortionMeshRows); 425 distortionSet->setDistortionMeshDimensions(distortionMeshRows, distortionMeshColumns); 425 426 } 426 427 } -
experimental/distortionNG/main.cpp
r392 r393 99 99 "./resources/ProjectSyntropy/blending_1.bmp", 100 100 "./resources/ProjectSyntropy/Vertices/frustum_1.csv", 101 DistortionSetupStrategy:: VERTEXDISTORTION );101 DistortionSetupStrategy::TEXCOORDDISTORTION ); 102 102 distortionManip->setDistortionSetupStrategy( psStrategy ); 103 103 viewer.addEventHandler(distortionManip); … … 129 129 // load the nodes from the commandline arguments. 130 130 osg::Node* rootnode = osgDB::readNodeFiles(arguments); 131 osgDB::Registry::instance()->getDataFilePathList().push_front("H:/AllInOnDB"); 131 132 132 133 if (!rootnode) 133 134 { 134 //osgDB::Registry::instance()->getDataFilePathList().push_front("H:/AllInOnDB"); 135 rootnode = osgDB::readNodeFile("resources/TestSphere/sphere_500.obj"); 135 rootnode = osgDB::readNodeFile("D:/osgVisual/experimental/distortionNG/resources/TestSphere/sphere_500.obj"); 136 136 if(!rootnode) 137 137 { -
experimental/distortionNG/shader.vert
r392 r393 1 varying vec2 texcoord_scene;2 varying vec2 texcoord_intensityMap;3 4 1 varying vec2 texCoord; 5 2 … … 7 4 { 8 5 gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex; 9 texcoord_scene = vec2(gl_MultiTexCoord0.xy);10 texcoord_intensityMap = vec2(gl_MultiTexCoord1.xy);11 6 texCoord = gl_MultiTexCoord0.xy; 12 7 } -
experimental/distortionNG/shaderIntensityMap.frag
r392 r393 1 1 uniform sampler2DRect sceneTexture; 2 2 uniform sampler2DRect intensityMapTexture; 3 varying vec2 texcoord_scene;4 varying vec2 texcoord_intensityMap;5 3 6 4 varying vec2 texCoord; … … 8 6 void main(void) 9 7 { 10 vec4 sceneColor; 11 vec4 blendColor; 12 13 //sceneColor = texture2DRect(sceneTexture, gl_FragCoord); 14 blendColor = texture2DRect(intensityMapTexture, gl_FragCoord); 8 vec4 blendColor = texture2DRect(intensityMapTexture, gl_FragCoord); 15 9 16 //gl_FragColor = blendColor * texture2DRect( sceneTexture, texCoord*vec2(1920, 1200)) ; 17 gl_FragColor = texture2DRect( sceneTexture, texCoord*vec2(1920, 1200)) ; 10 gl_FragColor = blendColor * texture2DRect( sceneTexture, texCoord) ; 18 11 } -
experimental/distortionNG/shaderIntensityMapVis.frag
r363 r393 1 1 uniform sampler2DRect sceneTexture; 2 2 uniform sampler2DRect intensityMapTexture; 3 varying vec2 texcoord_scene;4 varying vec2 texcoord_intensityMap;5 3 6 4 void main(void)
Note: See TracChangeset
for help on using the changeset viewer.