Added support for user defined setting of the shadow texture unit

This commit is contained in:
Robert Osfield
2011-08-24 19:38:58 +00:00
parent 26e2106636
commit 0d3169f645
3 changed files with 46 additions and 13 deletions

View File

@@ -800,6 +800,9 @@ int main(int argc, char** argv)
if (arguments.read("--persp")) vdsm->setShadowMapProjectionHint(osgShadow::ViewDependentShadowMap::PERSPECTIVE_SHADOW_MAP);
if (arguments.read("--ortho")) vdsm->setShadowMapProjectionHint(osgShadow::ViewDependentShadowMap::ORTHOGRAPHIC_SHADOW_MAP);
unsigned int unit=1;
if (arguments.read("--unit",unit)) vdsm->setBaseShadowTextureUnit(unit);
shadowedScene->setShadowTechnique(vdsm.get());
}