Compartir a través de


DepthStencilState.ReferenceStencil Property

Microsoft Silverlight will reach end of support after October 2021. Learn more.

Gets or sets a reference value to use for the stencil test. The default is zero.

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

Syntax

'Declaration
Public Property ReferenceStencil As Integer
public int ReferenceStencil { get; set; }

Property Value

Type: System.Int32
Integer that specifies the stencil test value to set or get.

Remarks

The reference value is compared, by the comparison function specified by the StencilFunction 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.

Version Information

Silverlight

Supported in: 5

Platforms

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.