<!--
{
  "availability" : [
    "iOS: 27.0.0 -",
    "iPadOS: 27.0.0 -",
    "tvOS: 27.0.0 -",
    "visionOS: 27.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "RealityKit",
  "identifier" : "/documentation/RealityKit/LowLevelTextureResource",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "RealityKit"
    ],
    "preciseIdentifier" : "s:19RealityCoreRenderer23LowLevelTextureResourceC"
  },
  "title" : "LowLevelTextureResource"
}
-->

# LowLevelTextureResource

A container for texture data in a custom format.

```
final class LowLevelTextureResource
```

## Overview

Use `LowLevelTextureResource` when you want to bring your own texture data to the renderer or
update your data frequently. Textures are updated on the GPU by writing to a `MTLTexture`
returned by `replace(commandBuffer:)`. The descriptor is analogous to `MTLTextureDescriptor`.

Create a `LowLevelTextureResource` using
[`makeTextureResource(descriptor:)`](/documentation/RealityKit/LowLevelRenderContext/makeTextureResource(descriptor:)).

## Topics

### Accessing the descriptor

[`var descriptor: LowLevelTextureResource.Descriptor`](/documentation/RealityKit/LowLevelTextureResource/descriptor-swift.property)

The descriptor used to create this texture resource.

[`struct Descriptor`](/documentation/RealityKit/LowLevelTextureResource/Descriptor-swift.struct)

The configuration for a new low-level texture resource.

### Reading and writing texture data

[`func read(commandBuffer: (any MTLCommandBuffer)?) -> any MTLTexture`](/documentation/RealityKit/LowLevelTextureResource/read(commandBuffer:))

Returns a Metal texture containing the current contents of the texture resource for GPU read operations.

[`func replace(commandBuffer: (any MTLCommandBuffer)?) -> any MTLTexture`](/documentation/RealityKit/LowLevelTextureResource/replace(commandBuffer:))

Returns a Metal texture you populate on the GPU with the new contents of the texture resource.



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)