texture
The texture object associated with this attachment.
Declaration
var texture: (any MTLTexture)? { get set }Mentioned in
Discussion
You need to set the attachment’s texture property, choosing an appropriate pixel format for the texture.
To store color values in an attachment, use a texture with a color-renderable pixel format.
To store depth values, use a texture with a depth-renderable pixel format, such as MTLPixelFormat.depth32Float.
To store stencil values, use a texture with a stencil-renderable pixel format, such as MTLPixelFormat.stencil8.
See Also
Related Documentation
- Metal Shading Language Guide
- Metal Programming Guide