Documentation
osgshadow
The osgshadow example program demonstrates the use of several shadow techniques that are available in osg or that are currently under development.
Volumetric shadowing
Not fully implemented yet
Shadow mapping
Standard depth shadow mapping
Soft shadow maps
Needs shader model 3.0+ support.
Parallel split shadow maps
Currently under development
Program arguments
argument | description |
-h or --help | Display this information. |
--positionalLight | Use a positional light. |
--directionalLight | Use a direction light. |
--noUpdate | Disable the updating the of light source. |
--base | Add a base geometry to test shadows. |
--sv | Select ShadowVolume implementation. |
--ssm | Select SoftShadowMap implementation. |
--sm | Select ShadowMap implementation. |
--pssm | Select ParallelSplitShadowMap implementation. |
--mapcount | ParallelSplitShadowMap texture count. |
--mapres | ParallelSplitShadowMap texture resolution. |
--debug-color | ParallelSplitShadowMap display debugging color (only the first 3 maps are color r=0,g=1,b=2.") |
--minNearSplit | ParallelSplitShadowMap shadow map near offset. |
--maxFarDist | ParallelSplitShadowMap max far distance to shadow. |
--moveVCamFactor | ParallelSplitShadowMap move the virtual frustum behind the real camera, (also back ground object can cast shadow). |
--NVidea | ParallelSplitShadowMap set default PolygonOffset for NVidea. |
--PolyOffset-Factor | ParallelSplitShadowMap set PolygonOffset factor. |
--PolyOffset-Unit" | ParallelSplitShadowMap set PolygonOffset unit. |
--CullFaceFront | ParallelSplitShadowMap add a cull face: front. |
-1 | Use test model one. |
-2 | Use test model two. |
-3 | Use test model three. |
--two-sided | Use two-sided stencil extension for shadow volumes. |
--two-pass | Use two-pass stencil for shadow volumes. |
Key handlers
key | description |
1 | Select trackballmanipulator |
2 | Select flightmanipulator |
3 | Select drivemanipulator |
4 | Select terrainmanipulator |
5 | Select animationpathmanipulator |
s | Cycle through statistics modes |
w | Cycle through solid, wire and point modes |
l | Toggle lighting |
t | Toggle textures |