Instance Method

setStencilFrontReferenceValue:backReferenceValue:

Sets the stencil reference values for front and back stencil comparison tests.

Required.

Declaration

- (void)setStencilFrontReferenceValue:(uint32_t)frontReferenceValue backReferenceValue:(uint32_t)backReferenceValue;

Parameters

frontReferenceValue

The front stencil reference value.

backReferenceValue

The back stencil reference value.

Discussion

The default value is 0.

This method considers both front and back-facing primitives. Reference values for the front and back stencil buffers are set separately.

See Also

Setting Depth and Stencil Behavior

- setDepthStencilState:

Sets the depth and stencil test state.

Required.

- setDepthBias:slopeScale:clamp:

Adjusts the depth values from fragment functions by a scaling factor and a scaling bias, clamping the bias to a maximum amount.

Required.

- setDepthClipMode:

Controls what is done with fragments outside of the near or far planes.

Required.

MTLDepthClipMode

The mode that determines how to deal with fragments outside of the near or far planes.

- setStencilReferenceValue:

Sets a stencil reference value for both front and back stencil comparison tests.

Required.