An option for rendering to the texture in a render pass.
SDKs
- iOS 9.0+
- macOS 10.11+
- Mac Catalyst 13.0+
- tvOS 9.0+
Framework
- Metal
Declaration
static var renderTarget: MTLTexture Usage { get }
Discussion
Set this option if you use the given texture as a color, depth, or stencil render target in any render pass. This option allows you to assign the texture to the texture
property of a MTLRender
.
Important
Rendering and writing to a texture are different operations, and you don’t need to combine their usage options. Set the render
option if you render to a given texture, but don’t set the shader
option if you don’t write to the texture. The render
and shader
options aren’t equivalent, and setting render
doesn’t require you to also set shader
.