Added --num-sm and --parallel-split and --cascaded command line options to set the appriopriate ViewDependentShadowMap settings.

This commit is contained in:
Robert Osfield 2011-12-19 09:09:30 +00:00
parent 74fb1f42d9
commit c225f2758c

View File

@ -931,6 +931,13 @@ int main(int argc, char** argv)
double n=0.0; double n=0.0;
if (arguments.read("-n",n)) settings->setMinimumShadowMapNearFarRatio(n); if (arguments.read("-n",n)) settings->setMinimumShadowMapNearFarRatio(n);
unsigned int numShadowMaps;
if (arguments.read("--num-sm",numShadowMaps)) settings->setNumShadowMapsPerLight(numShadowMaps);
if (arguments.read("--parallel-split") || arguments.read("--ps") ) settings->setMultipleShadowMapHint(osgShadow::ShadowSettings::PARALLEL_SPLIT);
if (arguments.read("--cascaded")) settings->setMultipleShadowMapHint(osgShadow::ShadowSettings::CASCADED);
int mapres = 1024; int mapres = 1024;
while (arguments.read("--mapres", mapres)) while (arguments.read("--mapres", mapres))
settings->setTextureSize(osg::Vec2s(mapres,mapres)); settings->setTextureSize(osg::Vec2s(mapres,mapres));