Changed new ViewDependentShadowMap to default to a perspective shadow map with automatic detection of a spot light/perspetive light projection

matrix to prevent inappropriate usage of perspective shadow map.
This commit is contained in:
Robert Osfield
2011-08-24 13:57:15 +00:00
parent 622cfb524c
commit 26e2106636
3 changed files with 19 additions and 80 deletions

View File

@@ -799,7 +799,7 @@ int main(int argc, char** argv)
while( arguments.read("--debugHUD") ) vdsm->setDebugDraw( true );
if (arguments.read("--persp")) vdsm->setShadowMapProjectionHint(osgShadow::ViewDependentShadowMap::PERSPECTIVE_SHADOW_MAP);
if (arguments.read("--lispsm")) vdsm->setShadowMapProjectionHint(osgShadow::ViewDependentShadowMap::LIGHT_SPACE_PERSPECTIVE_SHADOW_MAP);
if (arguments.read("--ortho")) vdsm->setShadowMapProjectionHint(osgShadow::ViewDependentShadowMap::ORTHOGRAPHIC_SHADOW_MAP);
shadowedScene->setShadowTechnique(vdsm.get());
}