<!--
{
  "availability" : [
    "iOS: 18.0.0 -",
    "iPadOS: 18.0.0 -",
    "macCatalyst: 18.0.0 -",
    "macOS: 15.0.0 -",
    "tvOS: 26.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "RealityKit",
  "identifier" : "/documentation/RealityKit/TextureResource/Format",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "RealityKit"
    ],
    "preciseIdentifier" : "s:17RealityFoundation15TextureResourceC6FormatV"
  },
  "title" : "TextureResource.Format"
}
-->

# TextureResource.Format

The pixel format and encoding of a texture.

```
struct Format
```

## Overview

The texture’s format controls the sampling and conversions (if any) to use when rendering with that texture.

## Topics

### Creating the format

[`static func color(TextureResource.Format.ColorSpace, pixelFormat: MTLPixelFormat) -> TextureResource.Format`](/documentation/RealityKit/TextureResource/Format/color(_:pixelFormat:))

Indicates that a texture contains color data to interpret in a specific color space.

[`static func normal(TextureResource.Format.NormalEncoding, pixelFormat: MTLPixelFormat) -> TextureResource.Format`](/documentation/RealityKit/TextureResource/Format/normal(_:pixelFormat:))

Indicates that a texture is a normal map.

[`static func raw(pixelFormat: MTLPixelFormat) -> TextureResource.Format`](/documentation/RealityKit/TextureResource/Format/raw(pixelFormat:))

Indicates a texture for unmodified use by a shader.

### Defining the format profile

[`enum ColorSpace`](/documentation/RealityKit/TextureResource/Format/ColorSpace)

A profile that specifies the interpretation of pixel values as a color.

[`enum NormalEncoding`](/documentation/RealityKit/TextureResource/Format/NormalEncoding)

A profile that specifies the interpretation of pixel values as a normal.

## Relationships

### Conforms To

[`Sendable`](/documentation/Swift/Sendable)

[`SendableMetatype`](/documentation/Swift/SendableMetatype)

[`Hashable`](/documentation/Swift/Hashable)

[`Equatable`](/documentation/Swift/Equatable)

---

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)