An object that defines the front-facing or back-facing stencil operations of a depth and stencil state object.
Mac Catalyst 13.0+
A stencil test is a comparison between a masked reference value and a masked value stored in a stencil attachment. (A value is masked by performing a logical AND operation on it with the readMask value.) The MTLStencilDescriptor object defines how to update the contents of the stencil attachment, based on the results of the stencil test and the depth test.