Instance Method

setStencilReferenceValue(_:)

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

Required.

Declaration

func setStencilReferenceValue(_ referenceValue: UInt32)

Parameters

ref

The stencil reference value.

Discussion

A stencil test uses the stencil reference value, as described for MTLStencilDescriptor. The default value is 0.

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 setStencilReferenceValues(front: UInt32, back: UInt32)

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

Required.