Changeset 2551


Ignore:
Timestamp:
10/04/07 09:33:09 (17 years ago)
Author:
szirmay
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • GTP/trunk/Lib/Illum/IllumModule/OgreIllumModule/src/RenderingRuns/OgreDepthShadowMapRenderingRun.cpp

    r2460 r2551  
    267267                                lispMat[3][3] = 0; 
    268268                                 
    269                                 depthMapCamera->setCustomProjectionMatrix(true, Matrix4::IDENTITY); 
    270                                 depthMapCamera->setCustomViewMatrix(true, lispMat * newViewMatrix); 
     269                                //depthMapCamera->setCustomProjectionMatrix(true, Matrix4::IDENTITY); 
     270                                //depthMapCamera->setCustomViewMatrix(true, lispMat * newViewMatrix); 
     271 
     272                                depthMapCamera->setCustomProjectionMatrix(true, lispMat); 
     273                                depthMapCamera->setCustomViewMatrix(true, newViewMatrix); 
    271274                        } 
    272275                        else 
     
    280283 
    281284                        Matrix4 lightMatrix = depthMapCamera->getViewMatrix(); 
    282                         frun->setLightMatrix(lightMatrix); 
     285                        //frun->setLightMatrix(lightMatrix); 
     286                        frun->setLightMatrix(depthMapCamera->getProjectionMatrix() * lightMatrix); 
    283287                         
    284288                        OgreIlluminationManager::getSingleton().updateGlobalRun( ILLUMRUN_FOCUSING_MAP, 
     
    302306                        scaleM.setScale(Vector3(2.0 / scale.x, 2.0 / scale.y, -2.0 / scale.z)); 
    303307                        projection = scaleM * trans;                     
    304                         depthMapCamera->setCustomProjectionMatrix(true, projection);                     
     308                        //depthMapCamera->setCustomProjectionMatrix(true, projection);   
     309                        lightFarPlane = scale.z; 
     310                        depthMapCamera->setCustomProjectionMatrix(true, projection * depthMapCamera->getProjectionMatrix());                     
    305311                } 
    306312                else if(light->getType() == Light::LT_SPOTLIGHT) 
Note: See TracChangeset for help on using the changeset viewer.