replace(commandBuffer:)
Retrieves a Metal texture that shaders can write to on the GPU. The texture’s contents are in an uninitialized state. The renderer waits for the command buffer to complete before using the texture for rendering.
Declaration
final func replace(commandBuffer: (any MTLCommandBuffer)?) -> any MTLTextureParameters
- commandBuffer:
The command buffer writing to this texture, or
nilto skip synchronization.
Return Value
A MTLTexture ready for GPU write operations.