The comparison that is performed between the masked reference value and a masked value in the stencil attachment.
- iOS 8.0+
- macOS 10.11+
- UIKit for Mac 13.0+Beta
- tvOS 9.0+
For example, if
MTLCompareFunctionLess, then the stencil test passes if the masked reference value is less than the masked stored stencil value. The default value is
MTLCompareFunctionAlways, which indicates that the stencil test always passes.
The stored stencil value and the reference value are both masked by performing a logical AND operation with the
readMask value before the comparison takes place. For more information on possible values, see
Specifying Stencil Functions and Operations
The operation that is performed to update the values in the stencil attachment when the stencil test fails.
The operation that is performed to update the values in the stencil attachment when the stencil test passes, but the depth test fails.
The operation that is performed to update the values in the stencil attachment when both the stencil test and the depth test pass.
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