Sets the depth and stencil test state.
- iOS 8.0+
- macOS 10.11+
- Mac Catalyst 13.0+Beta
- tvOS 9.0+
An object that contains the depth and stencil state.
The depth and stencil state must be compatible with the attachment configuration specified by the render pass descriptor. If you enable depth testing or depth writing, the
MTLRenderPassDescriptor must include a depth attachment. If you enable stencil testing or stencil writing, the
MTLRenderPassDescriptor must include a stencil attachment.
The default value is
nil; the default property values of
MTLDepthStencilDescriptor determine the behavior.
Setting Depth and Stencil Behavior
Adjusts the depth values from fragment functions by a scaling factor and a scaling bias, clamping the bias to a maximum amount.
Controls what is done with fragments outside of the near or far planes.
The mode that determines how to deal with fragments outside of the near or far planes.
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