Export (0) Print
Expand All

DepthStencilState.StencilFunction Property

Gets or sets the comparison function for the stencil test. The default is CompareFunction.Always.

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

public CompareFunction StencilFunction { get; set; }

Property Value

Value of a CompareFunction that represents the comparison function to set or get.

The comparison function is used to compare the reference value (stored in the ReferenceStencil property) to the stencil buffer entry of a pixel. This can be illustrated by a simple equation:

ReferenceStencil StencilFunction (stencil buffer entry)

This comparison applies only to the bits in the reference value and stencil buffer entry that are set in the stencil mask by this property. If the comparison is true, the stencil test passes and the pass operation (specified by the StencilPass property) is performed.

Xbox 360, Windows 7, Windows Vista, Windows XP

Community Additions

ADD
Show:
© 2015 Microsoft