Contents

MTLPixelFormat.x32_stencil8

A stencil pixel format used to read the stencil value from a texture with a combined 32-bit depth and 8-bit stencil value.

Declaration

case x32_stencil8

Discussion

You can’t directly read the stencil value of a texture with the MTLPixelFormat.depth32Float_stencil8 format. To read stencil values from a texture with the MTLPixelFormat.depth32Float_stencil8 format, create a texture view of that texture using the MTLPixelFormat.x32_stencil8 format, and sample the texture view instead.

See Also

Depth and stencil pixel formats