The comparison that is performed between the masked reference value and a masked value in the stencil attachment.
- iOS 8.0+
- macOS 10.11+
- tvOS 9.0+
For example, if
MTLCompare, then the stencil test passes if the masked reference value is less than the masked stored stencil value. The default value is
MTLCompare, 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
read value before the comparison takes place. For more information on possible values, see