Shadow Maps Parameters
- Last UpdatedJan 24, 2023
- 2 minute read
Parameters for Shadow Maps.
Alpha
Regulates the shadow intensity with the light.shadow\alpha parameter.
Attenuation
See Attenuation.
Size
The size of the Shadow Map generated by this light is set with the light.shadow\mapSize parameter.
This is a render target. The size can be anything up to the DirectX maximum size.
Bias
Surface acne (or z-fighting) occurs to the surface shadowing itself due to minor differences between the depth computation in a shader, and the depth of the same surface in the shadow buffer. Specify this with the light.shadow\mapBias parameter.
-
To alleviate this artifact, some tolerance threshold is required for the test between the scene pixel to be shadowed and the shadow map.
-
There is no global rule about how much threshold to apply. Adjust the values carefully for each case.
-
Applying too much threshold may lead to "Peter Panning" in which the object and its shadow become disconnected.

Filtering
Although you cannot directly smooth the shadow maps, you can smooth the results of the comparison between the scene pixel and the shadow map one.
The following filtering options are available:
-
Poisson: global parameters shadowMaps\poissonBlur\…
Invert Cull Rendering
The global parameter shadowMaps\invertCullMode renders the triangles of the meshes that do not face the light, instead of the triangles that face the light.
This alleviates the bias defects because the biasing is now relegated to the triangles that do not face the light (and that should already be in shadow). Bias is also alleviated because these triangles are entirely skipped when excludeBackFaces is On.

3DS Max Parameters
You can also set shadow maps parameters when exporting the lights from 3DSMax.