MTLStencilOperation.replace
A stencil operation that replaces a stencil value with a reference value.
Declaration
case replaceDiscussion
You can set by the reference value by calling the setStencilReferenceValue(_:) method of an MTLRenderCommandEncoder instance.