Contents

replace(using:)

Retrieves a Metal texture that your app’s shaders can write to when they run on a GPU.

Declaration

@MainActor func replace(using commandBuffer: any MTLCommandBuffer) -> any MTLTexture

Parameters

  • commandBuffer:

    The Mtlcommandbuffer you intend to use for texture modifications. RealityKit waits for the command buffer to complete before utilizing the texture for rendering.

Discussion

The buffer’s contents are in an uninitialized state.