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

Property Value

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

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