Instance Method

setDepthClipMode(_:)

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

Required.

Declaration

func setDepthClipMode(_ depthClipMode: MTLDepthClipMode)

Parameters

depthClipMode

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

Discussion

Use depth clipping to ignore fragments outside the z-axis boundaries of a viewing volume. Depth clipping is supported on all macOS GPU families and iOS family 4 and later.

The default value is MTLDepthClipMode.clip.

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.

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.

func setStencilReferenceValue(UInt32)

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

Required.