RasterizerState.DepthBias Property

Sets or retrieves the depth bias for polygons, which is the amount of bias to apply to the depth of a primitive to alleviate depth testing problems for primitives of similar depth. The default value is 0.

Namespace: Microsoft.Xna.Framework.Graphics
Assembly: Microsoft.Xna.Framework.Graphics (in microsoft.xna.framework.graphics.dll)

Syntax

public float DepthBias { get; set; }

Property Value

The amount of bias to apply to the depth of a primitive. The value ranges from 0 to 16 (inclusive).

Remarks

A polygon with a larger z-bias value appears in front of a polygon with a smaller value. For example, a polygon with a value of 1 is is appears drawn in front of a polygon with a value of 0.

See Also

Reference

RasterizerState Class
RasterizerState Members
Microsoft.Xna.Framework.Graphics Namespace

Platforms

Xbox 360, Windows 7, Windows Vista, Windows XP