From Wang Rui, "I've found a very covert bug in current VDSM implementation. It makes the computation of positional texgen incorrect if the shadow scene is under one or more child cameras with view/proj offsets. Using current stage instead will fix it."
This commit is contained in:
@@ -2303,9 +2303,8 @@ bool ViewDependentShadowMap::assignTexGenSettings(osgUtil::CullVisitor* cv, osg:
|
||||
osg::ref_ptr<osg::RefMatrix> refMatrix =
|
||||
new osg::RefMatrix( camera->getInverseViewMatrix() * (*(cv->getModelViewMatrix())) );
|
||||
|
||||
cv->getRenderStage()->getPositionalStateContainer()->addPositionedTextureAttribute( textureUnit, refMatrix.get(), texgen );
|
||||
|
||||
|
||||
osgUtil::RenderStage* currentStage = cv->getCurrentRenderBin()->getStage();
|
||||
currentStage->getPositionalStateContainer()->addPositionedTextureAttribute( textureUnit, refMatrix.get(), texgen );
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user