Instance Method

setStencilReferenceValues(front:back:)

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

Required.

Declaration

func setStencilReferenceValues(front frontReferenceValue: UInt32, back backReferenceValue: UInt32)

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

func setDepthStencilState(MTLDepthStencilState?)

Sets the depth and stencil test state.

Required.

func setDepthBias(Float, slopeScale: Float, clamp: Float)

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

Required.

func setDepthClipMode(MTLDepthClipMode)

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

Required.

enum MTLDepthClipMode

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

func setStencilReferenceValue(UInt32)

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

Required.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software