GVRDeepShadowMapping¶
-
MacroModule
¶ author MeVis Medical Solutions AG
package MeVisLab/Standard
definition GVRDeepShadowMapping.def
Purpose¶
The GVRDeepShadowMapping
implements deep shadow mapping. The implementation is based on the paper “GPU-accelerated deep shadow maps for direct volume rendering” by Markus Hadwiger et. al. (see https://portal.acm.org/citation.cfm?id=1283908).
Many thanks go to Markus Hadwiger for providing the GLSL shaders that are used in the module.
The module has high hardware requirements (it requires floating-point textures and FBO rendering to 3D textures) and will be quite slow if not used on up-to-date graphics cards.
Clipping planes are supported, but the shadow volume does not take them into account, the shader turns off shadowing near the clip planes. Mask volumes, Tag volumes, and other secondary volumes are supported for the shadow creation. The classification step of the shadow creation can be manually modified using the SoGVRShaderFunction
in the scene below this module.
Usage¶
The module needs to be placed in front of a SoGVRVolumeRenderer
module. The LUT and the SoGVRRayCastSettings
need to be placed in front of this module, otherwise the shadow map generation will fail. The SoGVRVolumeRenderer
needs to be connected to the input of this module as well, this is used for the shadow generation pass.
Parameter Fields¶
Field Index¶
Altitude : Float |
Shadow Map Layers : Integer |
Attach Light To Camera : Bool |
Shadow Map Size : Integer |
Azimuth : Float |
|
Compression Epsilon : Float |
|
Interactive Mode : Enum |
|
Interactive Shadow Map Layers : Integer |
|
Interactive Shadow Map Size : Integer |
|
Shadow Fetch Mode : Enum |
Visible Fields¶
Attach Light To Camera¶
-
name:
attachLightToCamera
, type:
Bool
, default:
TRUE
¶ If checked, the light is positioned in camera/view space; otherwise, it is positioned in world space.
Azimuth¶
-
name:
lightPolarPhi
, type:
Float
, default:
45
, minimum:
-180
, maximum:
180
¶ Sets the polar coordinate Phi of the light.
Altitude¶
-
name:
lightPolarRho
, type:
Float
, default:
-45
, minimum:
-180
, maximum:
180
¶ Sets the polar coordinate Rho of the light.
Compression Epsilon¶
-
name:
compressionEpsilon
, type:
Float
, default:
0.0099999998
, minimum:
0
, maximum:
0.5
¶ Sets an alpha compression epsilon used for DSM creation.
Shadow Map Layers¶
-
name:
shadowMapLayers
, type:
Integer
, default:
16
¶ Sets the number of layers the DSM texture uses.
Shadow Map Size¶
-
name:
shadowMapSize
, type:
Integer
, default:
1024
¶ Sets the size used for width and height of the shadow map.
Interactive Shadow Map Layers¶
-
name:
interactiveShadowMapLayers
, type:
Integer
, default:
4
¶ Sets the depth of the interactive shadow map.
Interactive Shadow Map Size¶
-
name:
interactiveShadowMapSize
, type:
Integer
, default:
512
¶ Sets the size of the interactive shadow map.
Interactive Mode¶
-
name:
interactiveMode
, type:
Enum
, default:
GVR_USE_STATIC_SHADOW
¶ Defines what to do while rendering interactively.
Values:
Title | Name | Description |
---|---|---|
Lowres Shadow | GVR_USE_LOWRES_SHADOW | Use the Interactive Shadow Map Layers and Interactive Shadow Map Size fields for shadow creation. |
Hires Shadow | GVR_USE_HIRES_SHADOW | Use the Shadow Map Layers and Shadow Map Size fields for shadow creation. |
Static Shadow | GVR_USE_STATIC_SHADOW | Use the shadow that was created on the last static rendering step (so the light will rotate with the volume). |