Instance Property

texture

The texture object associated with this attachment.

Declaration

@property(nonatomic, strong) id<MTLTexture> texture;

Discussion

You must 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 MTLPixelFormatDepth32Float.

  • To store stencil values, use a texture with a stencil-renderable pixel format, such as MTLPixelFormatStencil8.

See Also

Specifying the Texture for the Attachment

level

The mipmap level of the texture used for rendering to the attachment.

slice

The slice of the texture used for rendering to the attachment.

depthPlane

The depth plane of the texture used for rendering to the attachment.