Instance Property


The comparison that is performed between a fragment’s depth value and the depth value in the attachment, which determines whether to discard the fragment.


var depthCompareFunction: MTLCompareFunction { get set }


The default value is MTLCompareFunction.always, which indicates that the depth test always passes and the fragment remains a candidate to replace the data at the specified location. For more information on possible values, see MTLCompareFunction.

See Also

Specifying Depth Operations

var isDepthWriteEnabled: Bool

A Boolean value that indicates whether depth values can be written to the depth attachment.

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