Click or drag to resize
DigitalRuneStandardShadowNormalOffset 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 float NormalOffset { get; set; }

Property Value

Type: Single
The normal offset in shadow map texels. The default value is 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.

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