author | Florian Link |
package | MeVisLab/Standard |
dll | SoShadowMapping |
definition | SoShadowMapping.def |
see also | SoShadowCast |
keywords | cascaded, hardware, soft, PCF, percentage, closer, depth, perception |
The SoShadowMapping renders the scene that is located below itself using Cascaded Shadow Mapping. The module renders shadows for a single directional light source.
It is based on the NVidia SDK sample at http://developer.download.nvidia.com/SDK/10/opengl/samples.html#cascaded_shadow_maps and has been ported to work inside Open Inventor.
Example screenshot:
Just add Open Inventor geometry below the node and the will be rendered with shadows.
This module requires OpenGL 2.0, GLSL 1.20 and texture arrays.
It currently does not allow to extend the used shader with own GLSL code, if you have needs for this, contact florian@mevis.de.
The "Percentage Closer Soft Shadow" (PCSS) mode uses code provided by NVidia which was ported to from HLSL to GLSL. This software contains source code provided by NVIDIA Corporation. *"
Ambient Color: Color | Penumbra Angle: Float |
Attach Light To Camera: Bool | Shadow Darkness: Float |
Debug Depth Textures: Bool | Shadow Map Size: Integer |
Diffuse Color: Color | Shadow Map Splits: Integer |
Enable Texture Mapping: Bool | Shadow Mode: Enum |
Enabled: Bool | supported: Bool |
Light Polar Phi: Float | |
Light Polar Rho: Float |
Defines the size of the shadow map (should be a power of two for better performance)
Defines the number of frustum splits (and thus the number of shadow maps that are generated), setting this to 1 results in standard shadow mapping. Using 4 splits takes most resources but allows scenes with very near and very far objects, while still rendering high detail shadows on the near objects.
If enabled, the light angles are relative to the viewing direction of the camera.
Defines the diffuse color of the directional light.
Defines the ambient light color.
Defines how dark the shadow is (1. means black, 0. means fully transparent)
Defines the penumbra angle in degrees for the PCSS soft shadow mode.
Defines how the shadow is rendered.
Values:
Title | Name | Description |
---|---|---|
Single | SINGLE | A single shadow fetch is done. (Very sharp edges and aliasing). |
Pcf | PCF | Percent closer filtering done by the hardware (smoother edges). |
Pcf 4tap | PCF_4TAP | Four PCF samples are bilinear interpolated. |
Pcf Gaussian 3x3 | PCF_GAUSSIAN_3X3 | A 3x3 Gaussian filter is used (using 9 PCF samples). This results in the smoothest shadow edges. |
Percentage Closer Soft Shadows | PCSS | Percentage Closer Soft Shadow mapping as described in http://developer.download.nvidia.com/whitepapers/2008/PCSS_Integration.pdf The implementation uses a directional light which has a fixed penumbra slope angle. |