Assembly: Microsoft.Xna.Framework.Graphics (in microsoft.xna.framework.graphics.dll)
The reference value is compared (using the comparison function specified by StencilFunction) to the pixel data in the stencil buffer using the equation:
ReferenceStencil StencilFunction (stencil buffer entry)
This comparison applies only to the bits marked enabled by the stencil mask. If the comparison is true, the stencil test passes and the pass operation (specified by the DepthStencilState.StencilPass Property) is performed.