Contents

setStencilReferenceValue(_:)

Configures the same comparison value for front- and back-facing primitives.

Declaration

func setStencilReferenceValue(_ referenceValue: UInt32)

Parameters

  • referenceValue:

    A stencil test comparison value the render pipeline applies to both front- and back-facing primitives.

Discussion

The command sets the same reference value for front- and back-facing primitives (see stencilCompareFunction, frontFaceStencil, and backFaceStencil). This reference value applies to the stencil state you set with the setDepthStencilState(_:) method.

The render pass’s default reference value for the front and back stencil compare function is 0.

See Also

Configuring depth and stencil behavior