| | 1 | This example program demonstrates the use of several shadow techniques that are available in osg or that are currently under development. |
| | 2 | |
| | 3 | === Volumetric shadowing === |
| | 4 | Not fully implemented yet |
| | 5 | === Shadow mapping === |
| | 6 | Standard depth shadow mapping |
| | 7 | === Soft shadow maps === |
| | 8 | Needs shader model 3.0+ support. |
| | 9 | === Parallel split shadow maps === |
| | 10 | Currently under development |
| | 11 | |
| | 12 | |
| | 13 | == Program arguments == |
| | 14 | || |
| | 15 | ||'''argument''' || '''description''' || |
| | 16 | ||-h or --help || Display this information. || |
| | 17 | ||--positionalLight || Use a positional light. || |
| | 18 | ||--directionalLight || Use a direction light. || |
| | 19 | ||--noUpdate || Disable the updating the of light source. || |
| | 20 | ||--base || Add a base geometry to test shadows. || |
| | 21 | ||--sv || Select !ShadowVolume implementation. || |
| | 22 | ||--ssm || Select !SoftShadowMap implementation. || |
| | 23 | ||--sm || Select !ShadowMap implementation. || |
| | 24 | ||--pssm || Select !ParallelSplitShadowMap implementation. || |
| | 25 | ||--mapcount || !ParallelSplitShadowMap texture count. || |
| | 26 | ||--mapres || !ParallelSplitShadowMap texture resolution. || |
| | 27 | ||--debug-color || !ParallelSplitShadowMap display debugging color (only the first 3 maps are color r=0,g=1,b=2.") || |
| | 28 | ||--minNearSplit || !ParallelSplitShadowMap shadow map near offset. || |
| | 29 | ||--maxFarDist || !ParallelSplitShadowMap max far distance to shadow. || |
| | 30 | ||--moveVCamFactor || !ParallelSplitShadowMap move the virtual frustum behind the real camera, (also back ground object can cast shadow). || |
| | 31 | ||--NVidea || !ParallelSplitShadowMap set default !PolygonOffset for NVidea. || |
| | 32 | ||--PolyOffset-Factor || !ParallelSplitShadowMap set !PolygonOffset factor. || |
| | 33 | ||--PolyOffset-Unit" || !ParallelSplitShadowMap set !PolygonOffset unit. || |
| | 34 | ||--!CullFaceFront || !ParallelSplitShadowMap add a cull face: front. || |
| | 35 | ||-1 || Use test model one. || |
| | 36 | ||-2 || Use test model two. || |
| | 37 | ||-3 || Use test model three. || |
| | 38 | ||--two-sided || Use two-sided stencil extension for shadow volumes. || |
| | 39 | ||--two-pass || Use two-pass stencil for shadow volumes. || |
| | 40 | || |
| | 41 | |
| | 42 | == Key handlers == |
| | 43 | || |
| | 44 | ||'''key''' || '''description''' || |
| | 45 | || 1 || Select trackballmanipulator || |
| | 46 | || 2 || Select flightmanipulator || |
| | 47 | || 3 || Select drivemanipulator || |
| | 48 | || 4 || Select terrainmanipulator || |
| | 49 | || 5 || Select animationpathmanipulator || |
| | 50 | || s || Cycle through statistics modes || |
| | 51 | || w || Cycle through solid, wire and point modes || |
| | 52 | || l || Toggle lighting || |
| | 53 | || t || Toggle textures || |
| | 54 | || |