Click or drag to resize
DigitalRuneCascadedShadowDepthBias Property
Gets or sets the depth bias used to remove "surface acne".

Namespace: DigitalRune.Graphics
Assembly: DigitalRune.Graphics (in DigitalRune.Graphics.dll) Version: 1.2.0.0 (1.2.1.14562)
Syntax
public Vector4F DepthBias { get; set; }

Property Value

Type: Vector4F
The depth bias for each of the 4 cascades in shadow map texels. The default value is (5, 5, 5, 5).
Remarks

This value is used to modify the depth value of the shadow-receiving pixel. A positive value moves the receiver closer to the light source (into the light), a negative value moves the receiver farther away from the light source (into the shadow). If this value is too large, the shadow becomes visually disconnected from the occluder (a.k.a. "Peter Panning").

This value is relative to the shadow map resolution. A depth bias of 1 changes the depth by the size of one shadow map texel. Therefore, the depth bias values automatically scale with the shadow map resolution of each cascade. You can set 4 different values to tune the depth bias for each cascade.

The DepthBias is used to remove "surface acne" at surfaces facing the light source. The NormalOffset is used to remove "surface acne" at steep angles, i.e. surface parallel to the light direction. In practice a combination of DepthBias and NormalOffset is required to remove shadow artifacts.

See Also