Changeset 8379 for OpenSceneGraph/trunk/examples/osgshadow/osgshadow.cpp
- Timestamp:
- 05/28/08 16:11:22 (5 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
OpenSceneGraph/trunk/examples/osgshadow/osgshadow.cpp
r7990 r8379 503 503 arguments.getApplicationUsage()->addCommandLineOption("--maxFarDist", "ParallelSplitShadowMap max far distance to shadow.");//ADEGLI 504 504 arguments.getApplicationUsage()->addCommandLineOption("--moveVCamFactor", "ParallelSplitShadowMap move the virtual frustum behind the real camera, (also back ground object can cast shadow).");//ADEGLI 505 arguments.getApplicationUsage()->addCommandLineOption("--NVidia", "ParallelSplitShadowMap set default PolygonOffset for NVidia.");//ADEGLI506 505 arguments.getApplicationUsage()->addCommandLineOption("--PolyOffset-Factor", "ParallelSplitShadowMap set PolygonOffset factor.");//ADEGLI 507 506 arguments.getApplicationUsage()->addCommandLineOption("--PolyOffset-Unit", "ParallelSplitShadowMap set PolygonOffset unit.");//ADEGLI 508 arguments.getApplicationUsage()->addCommandLineOption("--CullFaceFront", "ParallelSplitShadowMap add a cull face: front.");//ADEGLI509 507 510 508 … … 627 625 628 626 629 double polyoffsetfactor = -0.02; 630 double polyoffsetunit = 1.0; 627 628 double polyoffsetfactor = pssm->getPolygonOffset().x(); 629 double polyoffsetunit = pssm->getPolygonOffset().y(); 631 630 while (arguments.read("--PolyOffset-Factor", polyoffsetfactor)); 632 631 while (arguments.read("--PolyOffset-Unit", polyoffsetunit)); 633 pssm->setPolygonOffset(osg::Vec2(polyoffsetfactor,polyoffsetunit)); //ATI Radeon 634 635 if (arguments.read("--NVidia")){ 636 //pssm->setPolygonOffset(osg::Vec2(-0.02,1.0)); //ATI Radeon 637 pssm->setPolygonOffset(osg::Vec2(10.0f,20.0f)); //NVidia 638 } 639 640 if ( arguments.read("--CullFaceFront") ) { 641 pssm->forceFrontCullFace(); 642 } 632 pssm->setPolygonOffset(osg::Vec2(polyoffsetfactor,polyoffsetunit)); 643 633 644 634 shadowedScene->setShadowTechnique(pssm.get()); … … 762 752 763 753 // osgDB::writeNodeFile(*group,"test.osg"); 764 754 765 755 while (!viewer.done()) 766 756 {
