Ignore:
Timestamp:
Jul 4, 2012, 11:02:56 PM (12 years ago)
Author:
Torben Dannhauer
Message:
 
Location:
experimental/distortionNG
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • experimental/distortionNG/DistortionManipulator.cpp

    r393 r396  
    517517void DistortionManipulator::updateDistortionSetup()
    518518{
    519         //updateDistortionViewProjectionMatrix();
     519        updateDistortionViewProjectionMatrix();
    520520        updateDistortionMesh();
    521521        _distortionSet->clearDirtyStatus();
     
    548548                printf("Camera Direction: %.2lf, %.2lf, %.2lf\n",Focus.x()-Eye.x(),Focus.y()-Eye.y(),Focus.z()-Eye.z());
    549549                printf("Vertical after: %.2lf, %.2lf, %.2lf\n",Vertical.x()-Eye.x(),Vertical.y()-Eye.y(),Vertical.z()-Eye.z());
     550
     551                double fovy, aspectRatio, zNear, zFar;
     552                _viewer->getCamera()->getProjectionMatrixAsPerspective(fovy, aspectRatio, zNear, zFar);
     553                OSG_ALWAYS<<"aspect ratio: "<<aspectRatio<<std::endl;
     554                //double newAspectRatio = double(_screenPixWidth) / double(_screenPixHeight);
     555                //double aspectRatioChange = newAspectRatio / aspectRatio;
     556                //if (aspectRatioChange != 1.0)
     557                //{
     558                //      _viewer->getCamera()->getProjectionMatrix() *= osg::Matrix::scale(1.0/aspectRatioChange,1.0,1.0);
     559                //}
     560
     561
    550562        }
    551563        else
  • experimental/distortionNG/shaderIntensityMap.frag

    r395 r396  
    66void main(void)
    77{
    8         //vec4 blendColor = texture2DRect(intensityMapTexture, gl_FragCoord);
    9         vec4 blendColor = texture2DRect(intensityMapTexture, texCoord);
     8        vec4 blendColor = texture2DRect(intensityMapTexture, gl_FragCoord);
     9        //vec4 blendColor = texture2DRect(intensityMapTexture, texCoord);
    1010       
    1111        gl_FragColor = blendColor * texture2DRect( sceneTexture, texCoord) ;
Note: See TracChangeset for help on using the changeset viewer.