RenderState.AlphaTestEnable Property

Gets or sets a render state that enables a per-pixel alpha test. The default value is false.

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

public bool AlphaTestEnable { get; set; }

Property Value

true if per-pixel alpha blending is enabled; false otherwise.

If the test passes, the pixel is processed by the frame buffer. Otherwise, all frame-buffer processing is skipped for the pixel. The test is done by comparing the incoming alpha value with the reference alpha value, using the comparison function provided by AlphaFunction. The reference alpha value is determined by the value set for ReferenceAlpha.

Xbox 360, Windows XP SP2, Windows Vista