Click or drag to resize
DigitalRuneCascadedShadowNormalOffset Property
Gets or sets the normal offset 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 NormalOffset { get; set; }

Property Value

Type: Vector4F
The normal offset for each of the 4 cascades in shadow map texels. The default value is (2, 2, 2, 2).
Remarks

This value is used to modify the position of shadow receivers. This has the effect of moving the receiver into the direction of the receiver's surface normal. This helps to remove "surface acne" especially on steep slopes. If this value is too high, the shadow becomes visually disconnected from the occluder (a.k.a. "Peter Panning").

This value is relative to the shadow map resolution. A normal offset of 1 moves the position by the size of one shadow map texel. Therefore, the normal offset values automatically scale with the shadow map resolution of each cascade. You can set 4 different values to tune the normal offset 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