<!--
{
  "availability" : [
    "iOS: 8.0.0 -",
    "iPadOS: 8.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.11.0 -",
    "tvOS: -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Metal",
  "identifier" : "/documentation/Metal/MTLPixelFormat",
  "metadataVersion" : "0.1.0",
  "role" : "Enumeration",
  "symbol" : {
    "kind" : "Enumeration",
    "modules" : [
      "Metal"
    ],
    "preciseIdentifier" : "c:@E@MTLPixelFormat"
  },
  "title" : "MTLPixelFormat"
}
-->

# MTLPixelFormat

The data formats that describe the organization and characteristics of individual pixels in a texture.

```
enum MTLPixelFormat
```

## Overview

There are three varieties of pixel formats: ordinary, packed, and compressed. For ordinary and packed formats, the name of the pixel format specifies the order of components (such as `R`, `RG`, `RGB`, `RGBA`, `BGRA`), bits per component (such as `8`, `16`, `32`), and data type for the component (such as `Float`, `Sint`, `Snorm`, `Uint`, `Unorm`). If the pixel format name has the `_sRGB` suffix, then reading and writing pixel data applies sRGB gamma compression and decompression. The alpha component of sRGB pixel formats is always treated as a linear value. For compressed formats, the name of the pixel format specifies a compression family (such as `ASTC`, `BC`, `EAC`, `ETC2`, `PVRTC`).

> Note:
> Pixel format availability and capabilities vary by feature set. See [Pixel Format Capabilities](https://developer.apple.com/metal/Metal-Feature-Set-Tables.pdf) for more information.

### Storage characteristics

The number and size of each pixel component determines the storage size of each pixel format.
For example, the storage size of [`MTLPixelFormat.bgra8Unorm`](/documentation/Metal/MTLPixelFormat/bgra8Unorm) is 32 bits (four 8-bit components)
and the storage size of [`MTLPixelFormat.bgr5A1Unorm`](/documentation/Metal/MTLPixelFormat/bgr5A1Unorm) is 16 bits (three 5-bit components and one 1-bit component).

For normalized signed integer formats (`Snorm`), values in the range `[-1.0, 1.0]` map to `[MIN_INT, MAX_INT]`, where `MIN_INT` is the most negative integer and `MAX_INT` is the most positive integer for the number of bits in the storage size.
Positive values and zero distribute uniformly in the range `[0.0, 1.0]`, and negative integer values greater than `(MIN_INT + 1)` distribute uniformly in the range `(-1.0, 0.0)`.

> Important:
> For `Snorm` formats, the values `MIN_INT` and `(MIN_INT + 1)` both map to `-1.0`.

For normalized unsigned integer formats (`Unorm`), values in the range `[0.0, 1.0]` are uniformly mapped to `[0, MAX_UINT]`, where `MAX_UINT` is the largest unsigned integer for the number of bits in the storage size.

Metal stores format data in little-endian byte order, with the least-significant byte at the lowest memory address.
For formats with components that are themselves byte-aligned and more than one byte, Metal also stores each component in little-endian byte order.

See Table 7.7 in the [Metal Shading Language Specification](https://developer.apple.com/metal/Metal-Shading-Language-Specification.pdf) (PDF) for details on pixel format normalization.

## Topics

### Ordinary 8-bit pixel formats

Formats for compact pixel data that reduce memory bandwidth and cache impact.

[`MTLPixelFormat.a8Unorm`](/documentation/Metal/MTLPixelFormat/a8Unorm)

Ordinary format with one 8-bit normalized unsigned integer component.

[`MTLPixelFormat.r8Unorm`](/documentation/Metal/MTLPixelFormat/r8Unorm)

Ordinary format with one 8-bit normalized unsigned integer component.

[`MTLPixelFormat.r8Unorm_srgb`](/documentation/Metal/MTLPixelFormat/r8Unorm_srgb)

Ordinary format with one 8-bit normalized unsigned integer component with conversion between sRGB and linear space.

[`MTLPixelFormat.r8Snorm`](/documentation/Metal/MTLPixelFormat/r8Snorm)

Ordinary format with one 8-bit normalized signed integer component.

[`MTLPixelFormat.r8Uint`](/documentation/Metal/MTLPixelFormat/r8Uint)

Ordinary format with one 8-bit unsigned integer component.

[`MTLPixelFormat.r8Sint`](/documentation/Metal/MTLPixelFormat/r8Sint)

Ordinary format with one 8-bit signed integer component.

### Ordinary 16-bit pixel formats

Formats for pixel data when the range of 8-bit values is insufficient.

[`MTLPixelFormat.r16Unorm`](/documentation/Metal/MTLPixelFormat/r16Unorm)

Ordinary format with one 16-bit normalized unsigned integer component.

[`MTLPixelFormat.r16Snorm`](/documentation/Metal/MTLPixelFormat/r16Snorm)

Ordinary format with one 16-bit normalized signed integer component.

[`MTLPixelFormat.r16Uint`](/documentation/Metal/MTLPixelFormat/r16Uint)

Ordinary format with one 16-bit unsigned integer component.

[`MTLPixelFormat.r16Sint`](/documentation/Metal/MTLPixelFormat/r16Sint)

Ordinary format with one 16-bit signed integer component.

[`MTLPixelFormat.r16Float`](/documentation/Metal/MTLPixelFormat/r16Float)

Ordinary format with one 16-bit floating-point component.

[`MTLPixelFormat.rg8Unorm`](/documentation/Metal/MTLPixelFormat/rg8Unorm)

Ordinary format with two 8-bit normalized unsigned integer components.

[`MTLPixelFormat.rg8Unorm_srgb`](/documentation/Metal/MTLPixelFormat/rg8Unorm_srgb)

Ordinary format with two 8-bit normalized unsigned integer components with conversion between sRGB and linear space.

[`MTLPixelFormat.rg8Snorm`](/documentation/Metal/MTLPixelFormat/rg8Snorm)

Ordinary format with two 8-bit normalized signed integer components.

[`MTLPixelFormat.rg8Uint`](/documentation/Metal/MTLPixelFormat/rg8Uint)

Ordinary format with two 8-bit unsigned integer components.

[`MTLPixelFormat.rg8Sint`](/documentation/Metal/MTLPixelFormat/rg8Sint)

Ordinary format with two 8-bit signed integer components.

### Packed 16-bit pixel formats

Formats that pack multiple color components into 16 bits with varying bits per component.

[`MTLPixelFormat.b5g6r5Unorm`](/documentation/Metal/MTLPixelFormat/b5g6r5Unorm)

Packed 16-bit format with normalized unsigned integer color components: 5 bits for blue, 6 bits for green, 5 bits for red, packed into 16 bits.

[`MTLPixelFormat.a1bgr5Unorm`](/documentation/Metal/MTLPixelFormat/a1bgr5Unorm)

Packed 16-bit format with normalized unsigned integer color components: 5 bits each for BGR and 1 for alpha, packed into 16 bits.

[`MTLPixelFormat.abgr4Unorm`](/documentation/Metal/MTLPixelFormat/abgr4Unorm)

Packed 16-bit format with normalized unsigned integer color components: 4 bits each for ABGR, packed into 16 bits.

[`MTLPixelFormat.bgr5A1Unorm`](/documentation/Metal/MTLPixelFormat/bgr5A1Unorm)

Packed 16-bit format with normalized unsigned integer color components: 5 bits each for BGR and 1 for alpha, packed into 16 bits.

### Ordinary 32-bit pixel formats

Formats for high-precision pixel data or multicomponent color values.

[`MTLPixelFormat.r32Uint`](/documentation/Metal/MTLPixelFormat/r32Uint)

Ordinary format with one 32-bit unsigned integer component.

[`MTLPixelFormat.r32Sint`](/documentation/Metal/MTLPixelFormat/r32Sint)

Ordinary format with one 32-bit signed integer component.

[`MTLPixelFormat.r32Float`](/documentation/Metal/MTLPixelFormat/r32Float)

Ordinary format with one 32-bit floating-point component.

[`MTLPixelFormat.rg16Unorm`](/documentation/Metal/MTLPixelFormat/rg16Unorm)

Ordinary format with two 16-bit normalized unsigned integer components.

[`MTLPixelFormat.rg16Snorm`](/documentation/Metal/MTLPixelFormat/rg16Snorm)

Ordinary format with two 16-bit normalized signed integer components.

[`MTLPixelFormat.rg16Uint`](/documentation/Metal/MTLPixelFormat/rg16Uint)

Ordinary format with two 16-bit unsigned integer components.

[`MTLPixelFormat.rg16Sint`](/documentation/Metal/MTLPixelFormat/rg16Sint)

Ordinary format with two 16-bit signed integer components.

[`MTLPixelFormat.rg16Float`](/documentation/Metal/MTLPixelFormat/rg16Float)

Ordinary format with two 16-bit floating-point components.

[`MTLPixelFormat.rgba8Unorm`](/documentation/Metal/MTLPixelFormat/rgba8Unorm)

Ordinary format with four 8-bit normalized unsigned integer components in RGBA order.

[`MTLPixelFormat.rgba8Unorm_srgb`](/documentation/Metal/MTLPixelFormat/rgba8Unorm_srgb)

Ordinary format with four 8-bit normalized unsigned integer components in RGBA order with conversion between sRGB and linear space.

[`MTLPixelFormat.rgba8Snorm`](/documentation/Metal/MTLPixelFormat/rgba8Snorm)

Ordinary format with four 8-bit normalized signed integer components in RGBA order.

[`MTLPixelFormat.rgba8Uint`](/documentation/Metal/MTLPixelFormat/rgba8Uint)

Ordinary format with four 8-bit unsigned integer components in RGBA order.

[`MTLPixelFormat.rgba8Sint`](/documentation/Metal/MTLPixelFormat/rgba8Sint)

Ordinary format with four 8-bit signed integer components in RGBA order.

[`MTLPixelFormat.bgra8Unorm`](/documentation/Metal/MTLPixelFormat/bgra8Unorm)

Ordinary format with four 8-bit normalized unsigned integer components in BGRA order.

[`MTLPixelFormat.bgra8Unorm_srgb`](/documentation/Metal/MTLPixelFormat/bgra8Unorm_srgb)

Ordinary format with four 8-bit normalized unsigned integer components in BGRA order with conversion between sRGB and linear space.

### Packed 32-bit pixel formats

Formats that pack multiple color components into 32 bits with shared exponents or variable precision per channel.

[`MTLPixelFormat.bgr10a2Unorm`](/documentation/Metal/MTLPixelFormat/bgr10a2Unorm)

A 32-bit packed pixel format with four normalized unsigned integer components: 10-bit blue, 10-bit green, 10-bit red, and 2-bit alpha.

[`MTLPixelFormat.rgb10a2Unorm`](/documentation/Metal/MTLPixelFormat/rgb10a2Unorm)

A 32-bit packed pixel format with four normalized unsigned integer components: 10-bit red, 10-bit green, 10-bit blue, and 2-bit alpha.

[`MTLPixelFormat.rgb10a2Uint`](/documentation/Metal/MTLPixelFormat/rgb10a2Uint)

A 32-bit packed pixel format with four unsigned integer components: 10-bit red, 10-bit green, 10-bit blue, and 2-bit alpha.

[`MTLPixelFormat.rg11b10Float`](/documentation/Metal/MTLPixelFormat/rg11b10Float)

32-bit format with floating-point color components, 11 bits each for red and green and 10 bits for blue.

[`MTLPixelFormat.rgb9e5Float`](/documentation/Metal/MTLPixelFormat/rgb9e5Float)

Packed 32-bit format with floating-point color components: 9 bits each for RGB and 5 bits for an exponent shared by RGB, packed into 32 bits.

### Ordinary 64-bit pixel formats

Formats for high-precision pixel data or multicomponent floating-point values.

[`MTLPixelFormat.rg32Uint`](/documentation/Metal/MTLPixelFormat/rg32Uint)

Ordinary format with two 32-bit unsigned integer components.

[`MTLPixelFormat.rg32Sint`](/documentation/Metal/MTLPixelFormat/rg32Sint)

Ordinary format with two 32-bit signed integer components.

[`MTLPixelFormat.rg32Float`](/documentation/Metal/MTLPixelFormat/rg32Float)

Ordinary format with two 32-bit floating-point components.

[`MTLPixelFormat.rgba16Unorm`](/documentation/Metal/MTLPixelFormat/rgba16Unorm)

Ordinary format with four 16-bit normalized unsigned integer components in RGBA order.

[`MTLPixelFormat.rgba16Snorm`](/documentation/Metal/MTLPixelFormat/rgba16Snorm)

Ordinary format with four 16-bit normalized signed integer components in RGBA order.

[`MTLPixelFormat.rgba16Uint`](/documentation/Metal/MTLPixelFormat/rgba16Uint)

Ordinary format with four 16-bit unsigned integer components in RGBA order.

[`MTLPixelFormat.rgba16Sint`](/documentation/Metal/MTLPixelFormat/rgba16Sint)

Ordinary format with four 16-bit signed integer components in RGBA order.

[`MTLPixelFormat.rgba16Float`](/documentation/Metal/MTLPixelFormat/rgba16Float)

Ordinary format with four 16-bit floating-point components in RGBA order.

### Ordinary 128-bit pixel formats

Formats for maximum-precision pixel data or four-component floating-point values.

[`MTLPixelFormat.rgba32Uint`](/documentation/Metal/MTLPixelFormat/rgba32Uint)

Ordinary format with four 32-bit unsigned integer components in RGBA order.

[`MTLPixelFormat.rgba32Sint`](/documentation/Metal/MTLPixelFormat/rgba32Sint)

Ordinary format with four 32-bit signed integer components in RGBA order.

[`MTLPixelFormat.rgba32Float`](/documentation/Metal/MTLPixelFormat/rgba32Float)

Ordinary format with four 32-bit floating-point components in RGBA order.

### Compressed PVRTC pixel formats

Formats that reduce texture memory usage with lossy, fixed-rate compression.

[`MTLPixelFormat.pvrtc_rgb_2bpp`](/documentation/Metal/MTLPixelFormat/pvrtc_rgb_2bpp)

A compressed format that uses PVRTC compression and 2bpp for RGB components.

[`MTLPixelFormat.pvrtc_rgb_2bpp_srgb`](/documentation/Metal/MTLPixelFormat/pvrtc_rgb_2bpp_srgb)

A compressed format that uses PVRTC compression and 2bpp for RGB components with
a conversion between sRGB and linear space.

[`MTLPixelFormat.pvrtc_rgb_4bpp`](/documentation/Metal/MTLPixelFormat/pvrtc_rgb_4bpp)

A compressed format that uses PVRTC compression and 4bpp for RGB components.

[`MTLPixelFormat.pvrtc_rgb_4bpp_srgb`](/documentation/Metal/MTLPixelFormat/pvrtc_rgb_4bpp_srgb)

A compressed format that uses PVRTC compression and 4bpp for RGB components with
a conversion between sRGB and linear space.

[`MTLPixelFormat.pvrtc_rgba_2bpp`](/documentation/Metal/MTLPixelFormat/pvrtc_rgba_2bpp)

A compressed format that uses PVRTC compression and 2bpp for RGBA components.

[`MTLPixelFormat.pvrtc_rgba_2bpp_srgb`](/documentation/Metal/MTLPixelFormat/pvrtc_rgba_2bpp_srgb)

A compressed format that uses PVRTC compression and 2bpp for RGBA components with
a conversion between sRGB and linear space.

[`MTLPixelFormat.pvrtc_rgba_4bpp`](/documentation/Metal/MTLPixelFormat/pvrtc_rgba_4bpp)

A compressed format that uses PVRTC compression and 4bpp for RGBA components.

[`MTLPixelFormat.pvrtc_rgba_4bpp_srgb`](/documentation/Metal/MTLPixelFormat/pvrtc_rgba_4bpp_srgb)

A compressed format that uses PVRTC compression and 4bpp for RGBA components with
a conversion between sRGB and linear space.

### Compressed EAC/ETC pixel formats

Formats that reduce texture memory usage with lossy compression.

[`MTLPixelFormat.eac_r11Unorm`](/documentation/Metal/MTLPixelFormat/eac_r11Unorm)

Compressed format using EAC compression with one normalized unsigned integer component.

[`MTLPixelFormat.eac_r11Snorm`](/documentation/Metal/MTLPixelFormat/eac_r11Snorm)

Compressed format using EAC compression with one normalized signed integer component.

[`MTLPixelFormat.eac_rg11Unorm`](/documentation/Metal/MTLPixelFormat/eac_rg11Unorm)

Compressed format using EAC compression with two normalized unsigned integer components.

[`MTLPixelFormat.eac_rg11Snorm`](/documentation/Metal/MTLPixelFormat/eac_rg11Snorm)

Compressed format using EAC compression with two normalized signed integer components.

[`MTLPixelFormat.eac_rgba8`](/documentation/Metal/MTLPixelFormat/eac_rgba8)

Compressed format using EAC compression with four 8-bit components.

[`MTLPixelFormat.eac_rgba8_srgb`](/documentation/Metal/MTLPixelFormat/eac_rgba8_srgb)

Compressed format using EAC compression with four 8-bit components with conversion between sRGB and linear space.

[`MTLPixelFormat.etc2_rgb8`](/documentation/Metal/MTLPixelFormat/etc2_rgb8)

Compressed format using ETC2 compression with three 8-bit components.

[`MTLPixelFormat.etc2_rgb8_srgb`](/documentation/Metal/MTLPixelFormat/etc2_rgb8_srgb)

Compressed format using ETC2 compression with three 8-bit components with conversion between sRGB and linear space.

[`MTLPixelFormat.etc2_rgb8a1`](/documentation/Metal/MTLPixelFormat/etc2_rgb8a1)

Compressed format using ETC2 compression with four 8-bit components.

[`MTLPixelFormat.etc2_rgb8a1_srgb`](/documentation/Metal/MTLPixelFormat/etc2_rgb8a1_srgb)

Compressed format using ETC2 compression with four 8-bit components with conversion between sRGB and linear space.

### Compressed ASTC pixel formats

ASTC formats use a fixed number of bytes per block, so image quality decreases as the block dimensions grow.

[`MTLPixelFormat.astc_4x4_srgb`](/documentation/Metal/MTLPixelFormat/astc_4x4_srgb)

ASTC-compressed format with low-dynamic-range content, conversion between sRGB and linear space, a block width of 4, and a block height of 4.

[`MTLPixelFormat.astc_5x4_srgb`](/documentation/Metal/MTLPixelFormat/astc_5x4_srgb)

ASTC-compressed format with low-dynamic-range content, conversion between sRGB and linear space, a block width of 5, and a block height of 4.

[`MTLPixelFormat.astc_5x5_srgb`](/documentation/Metal/MTLPixelFormat/astc_5x5_srgb)

ASTC-compressed format with low-dynamic-range content, conversion between sRGB and linear space, a block width of 5, and a block height of 5.

[`MTLPixelFormat.astc_6x5_srgb`](/documentation/Metal/MTLPixelFormat/astc_6x5_srgb)

ASTC-compressed format with low-dynamic-range content, conversion between sRGB and linear space, a block width of 6, and a block height of 5.

[`MTLPixelFormat.astc_6x6_srgb`](/documentation/Metal/MTLPixelFormat/astc_6x6_srgb)

ASTC-compressed format with low-dynamic-range content, conversion between sRGB and linear space, a block width of 6, and a block height of 6.

[`MTLPixelFormat.astc_8x5_srgb`](/documentation/Metal/MTLPixelFormat/astc_8x5_srgb)

ASTC-compressed format with low-dynamic-range content, conversion between sRGB and linear space, a block width of 8, and a block height of 5.

[`MTLPixelFormat.astc_8x6_srgb`](/documentation/Metal/MTLPixelFormat/astc_8x6_srgb)

ASTC-compressed format with low-dynamic-range content, conversion between sRGB and linear space, a block width of 8, and a block height of 6.

[`MTLPixelFormat.astc_8x8_srgb`](/documentation/Metal/MTLPixelFormat/astc_8x8_srgb)

ASTC-compressed format with low-dynamic-range content, conversion between sRGB and linear space, a block width of 8, and a block height of 8.

[`MTLPixelFormat.astc_10x5_srgb`](/documentation/Metal/MTLPixelFormat/astc_10x5_srgb)

ASTC-compressed format with low-dynamic-range content, conversion between sRGB and linear space, a block width of 10, and a block height of 5.

[`MTLPixelFormat.astc_10x6_srgb`](/documentation/Metal/MTLPixelFormat/astc_10x6_srgb)

ASTC-compressed format with low-dynamic-range content, conversion between sRGB and linear space, a block width of 10, and a block height of 6.

[`MTLPixelFormat.astc_10x8_srgb`](/documentation/Metal/MTLPixelFormat/astc_10x8_srgb)

ASTC-compressed format with low-dynamic-range content, conversion between sRGB and linear space, a block width of 10, and a block height of 8.

[`MTLPixelFormat.astc_10x10_srgb`](/documentation/Metal/MTLPixelFormat/astc_10x10_srgb)

ASTC-compressed format with low-dynamic-range content, conversion between sRGB and linear space, a block width of 10, and a block height of 10.

[`MTLPixelFormat.astc_12x10_srgb`](/documentation/Metal/MTLPixelFormat/astc_12x10_srgb)

ASTC-compressed format with low-dynamic-range content, conversion between sRGB and linear space, a block width of 12, and a block height of 10.

[`MTLPixelFormat.astc_12x12_srgb`](/documentation/Metal/MTLPixelFormat/astc_12x12_srgb)

ASTC-compressed format with low-dynamic-range content, conversion between sRGB and linear space, a block width of 12, and a block height of 12.

[`MTLPixelFormat.astc_4x4_ldr`](/documentation/Metal/MTLPixelFormat/astc_4x4_ldr)

ASTC-compressed format with low-dynamic-range content, a block width of 4, and a block height of 4.

[`MTLPixelFormat.astc_5x4_ldr`](/documentation/Metal/MTLPixelFormat/astc_5x4_ldr)

ASTC-compressed format with low-dynamic-range content, a block width of 5, and a block height of 4.

[`MTLPixelFormat.astc_5x5_ldr`](/documentation/Metal/MTLPixelFormat/astc_5x5_ldr)

ASTC-compressed format with low-dynamic-range content, a block width of 5, and a block height of 5.

[`MTLPixelFormat.astc_6x5_ldr`](/documentation/Metal/MTLPixelFormat/astc_6x5_ldr)

ASTC-compressed format with low-dynamic-range content, a block width of 6, and a block height of 5.

[`MTLPixelFormat.astc_6x6_ldr`](/documentation/Metal/MTLPixelFormat/astc_6x6_ldr)

ASTC-compressed format with low-dynamic-range content, a block width of 6, and a block height of 6.

[`MTLPixelFormat.astc_8x5_ldr`](/documentation/Metal/MTLPixelFormat/astc_8x5_ldr)

ASTC-compressed format with low-dynamic-range content, a block width of 8, and a block height of 5.

[`MTLPixelFormat.astc_8x6_ldr`](/documentation/Metal/MTLPixelFormat/astc_8x6_ldr)

ASTC-compressed format with low-dynamic-range content, a block width of 8, and a block height of 6.

[`MTLPixelFormat.astc_8x8_ldr`](/documentation/Metal/MTLPixelFormat/astc_8x8_ldr)

ASTC-compressed format with low-dynamic-range content, a block width of 8, and a block height of 8.

[`MTLPixelFormat.astc_10x5_ldr`](/documentation/Metal/MTLPixelFormat/astc_10x5_ldr)

ASTC-compressed format with low-dynamic-range content, a block width of 10, and a block height of 5.

[`MTLPixelFormat.astc_10x6_ldr`](/documentation/Metal/MTLPixelFormat/astc_10x6_ldr)

ASTC-compressed format with low-dynamic-range content, a block width of 10, and a block height of 6.

[`MTLPixelFormat.astc_10x8_ldr`](/documentation/Metal/MTLPixelFormat/astc_10x8_ldr)

ASTC-compressed format with low-dynamic-range content, a block width of 10, and a block height of 8.

[`MTLPixelFormat.astc_10x10_ldr`](/documentation/Metal/MTLPixelFormat/astc_10x10_ldr)

ASTC-compressed format with low-dynamic-range content, a block width of 10, and a block height of 10.

[`MTLPixelFormat.astc_12x10_ldr`](/documentation/Metal/MTLPixelFormat/astc_12x10_ldr)

ASTC-compressed format with low-dynamic-range content, a block width of 12, and a block height of 10.

[`MTLPixelFormat.astc_12x12_ldr`](/documentation/Metal/MTLPixelFormat/astc_12x12_ldr)

ASTC-compressed format with low-dynamic-range content, a block width of 12, and a block height of 12.

[`MTLPixelFormat.astc_4x4_hdr`](/documentation/Metal/MTLPixelFormat/astc_4x4_hdr)

ASTC-compressed format with high-dynamic-range content, a block width of 4, and a block height of 4.

[`MTLPixelFormat.astc_5x4_hdr`](/documentation/Metal/MTLPixelFormat/astc_5x4_hdr)

ASTC-compressed format with high-dynamic range content, a block width of 5, and a block height of 4.

[`MTLPixelFormat.astc_5x5_hdr`](/documentation/Metal/MTLPixelFormat/astc_5x5_hdr)

ASTC-compressed format with high-dynamic range content, a block width of 5, and a block height of 5.

[`MTLPixelFormat.astc_6x5_hdr`](/documentation/Metal/MTLPixelFormat/astc_6x5_hdr)

ASTC-compressed format with high-dynamic range content, a block width of 6, and a block height of 5.

[`MTLPixelFormat.astc_6x6_hdr`](/documentation/Metal/MTLPixelFormat/astc_6x6_hdr)

ASTC-compressed format with high-dynamic range content, a block width of 6, and a block height of 6.

[`MTLPixelFormat.astc_8x5_hdr`](/documentation/Metal/MTLPixelFormat/astc_8x5_hdr)

ASTC-compressed format with high-dynamic range content, a block width of 8, and a block height of 5.

[`MTLPixelFormat.astc_8x6_hdr`](/documentation/Metal/MTLPixelFormat/astc_8x6_hdr)

ASTC-compressed format with high-dynamic range content, a block width of 8, and a block height of 6.

[`MTLPixelFormat.astc_8x8_hdr`](/documentation/Metal/MTLPixelFormat/astc_8x8_hdr)

ASTC-compressed format with high-dynamic range content, a block width of 8, and a block height of 8.

[`MTLPixelFormat.astc_10x5_hdr`](/documentation/Metal/MTLPixelFormat/astc_10x5_hdr)

ASTC-compressed format with high-dynamic range content, a block width of 10, and a block height of 5.

[`MTLPixelFormat.astc_10x6_hdr`](/documentation/Metal/MTLPixelFormat/astc_10x6_hdr)

ASTC-compressed format with high-dynamic range content, a block width of 10, and a block height of 6.

[`MTLPixelFormat.astc_10x8_hdr`](/documentation/Metal/MTLPixelFormat/astc_10x8_hdr)

ASTC-compressed format with high-dynamic range content, a block width of 10, and a block height of 8.

[`MTLPixelFormat.astc_10x10_hdr`](/documentation/Metal/MTLPixelFormat/astc_10x10_hdr)

ASTC-compressed format with high-dynamic range content, a block width of 10, and a block height of 10.

[`MTLPixelFormat.astc_12x10_hdr`](/documentation/Metal/MTLPixelFormat/astc_12x10_hdr)

ASTC-compressed format with high-dynamic range content, a block width of 12, and a block height of 10.

[`MTLPixelFormat.astc_12x12_hdr`](/documentation/Metal/MTLPixelFormat/astc_12x12_hdr)

ASTC-compressed format with high-dynamic range content, a block width of 12, and a block height of 12.

### Compressed BC pixel formats

Block Compression formats that reduce texture memory usage.

[`MTLPixelFormat.bc1_rgba`](/documentation/Metal/MTLPixelFormat/bc1_rgba)

Compressed format with two 16-bit color components and one 32-bit descriptor component.

[`MTLPixelFormat.bc1_rgba_srgb`](/documentation/Metal/MTLPixelFormat/bc1_rgba_srgb)

Compressed format with two 16-bit color components and one 32-bit descriptor component, with conversion between sRGB and linear space.

[`MTLPixelFormat.bc2_rgba`](/documentation/Metal/MTLPixelFormat/bc2_rgba)

Compressed format with two 64-bit chunks. The first chunk contains two 8-bit alpha components and one 48-bit descriptor component. The second chunk contains two 16-bit color components and one 32-bit descriptor component.

[`MTLPixelFormat.bc2_rgba_srgb`](/documentation/Metal/MTLPixelFormat/bc2_rgba_srgb)

Compressed format with two 64-bit chunks, with conversion between sRGB and linear space. The first chunk contains two 8-bit alpha components and one 48-bit descriptor component. The second chunk contains two 16-bit color components and one 32-bit descriptor component.

[`MTLPixelFormat.bc3_rgba`](/documentation/Metal/MTLPixelFormat/bc3_rgba)

Compressed format with two 64-bit chunks. The first chunk contains two 8-bit alpha components and one 48-bit descriptor component. The second chunk contains two 16-bit color components and one 32-bit descriptor component.

[`MTLPixelFormat.bc3_rgba_srgb`](/documentation/Metal/MTLPixelFormat/bc3_rgba_srgb)

Compressed format with two 64-bit chunks, with conversion between sRGB and linear space. The first chunk contains two 8-bit alpha components and one 48-bit descriptor component. The second chunk contains two 16-bit color components and one 32-bit descriptor component.

[`MTLPixelFormat.bc4_rUnorm`](/documentation/Metal/MTLPixelFormat/bc4_rUnorm)

Compressed format with one normalized unsigned integer component.

[`MTLPixelFormat.bc4_rSnorm`](/documentation/Metal/MTLPixelFormat/bc4_rSnorm)

Compressed format with one normalized signed integer component.

[`MTLPixelFormat.bc5_rgUnorm`](/documentation/Metal/MTLPixelFormat/bc5_rgUnorm)

Compressed format with two normalized unsigned integer components.

[`MTLPixelFormat.bc5_rgSnorm`](/documentation/Metal/MTLPixelFormat/bc5_rgSnorm)

Compressed format with two normalized signed integer components.

[`MTLPixelFormat.bc6H_rgbFloat`](/documentation/Metal/MTLPixelFormat/bc6H_rgbFloat)

Compressed format with four floating-point components.

[`MTLPixelFormat.bc6H_rgbuFloat`](/documentation/Metal/MTLPixelFormat/bc6H_rgbuFloat)

Compressed format with four unsigned floating-point components.

[`MTLPixelFormat.bc7_rgbaUnorm`](/documentation/Metal/MTLPixelFormat/bc7_rgbaUnorm)

Compressed format with four normalized unsigned integer components.

[`MTLPixelFormat.bc7_rgbaUnorm_srgb`](/documentation/Metal/MTLPixelFormat/bc7_rgbaUnorm_srgb)

Compressed format with four normalized unsigned integer components, with conversion between sRGB and linear space.

### YUV pixel formats

Formats for video data that separate luminance and chrominance components.

[`MTLPixelFormat.gbgr422`](/documentation/Metal/MTLPixelFormat/gbgr422)

A pixel format where the red and green components are subsampled horizontally.

[`MTLPixelFormat.bgrg422`](/documentation/Metal/MTLPixelFormat/bgrg422)

A pixel format where the red and green components are subsampled horizontally.

### Depth and stencil pixel formats

Formats that store depth values or stencil data for depth testing and stencil operations.

[`MTLPixelFormat.depth16Unorm`](/documentation/Metal/MTLPixelFormat/depth16Unorm)

A pixel format for a depth-render target that has a 16-bit normalized, unsigned-integer component.

[`MTLPixelFormat.depth32Float`](/documentation/Metal/MTLPixelFormat/depth32Float)

A pixel format with one 32-bit floating-point component, used for a depth render target.

[`MTLPixelFormat.stencil8`](/documentation/Metal/MTLPixelFormat/stencil8)

A pixel format with an 8-bit unsigned integer component, used for a stencil render target.

[`MTLPixelFormat.depth24Unorm_stencil8`](/documentation/Metal/MTLPixelFormat/depth24Unorm_stencil8)

A 32-bit combined depth and stencil pixel format with a 24-bit normalized unsigned integer for depth and an 8-bit unsigned integer for stencil.

[`MTLPixelFormat.depth32Float_stencil8`](/documentation/Metal/MTLPixelFormat/depth32Float_stencil8)

A 40-bit combined depth and stencil pixel format with a 32-bit floating-point value for depth and an 8-bit unsigned integer for stencil.

[`MTLPixelFormat.x32_stencil8`](/documentation/Metal/MTLPixelFormat/x32_stencil8)

A stencil pixel format used to read the stencil value from a texture with a combined 32-bit depth and 8-bit stencil value.

[`MTLPixelFormat.x24_stencil8`](/documentation/Metal/MTLPixelFormat/x24_stencil8)

A stencil pixel format used to read the stencil value from a texture with a combined 24-bit depth and 8-bit stencil value.

### Extended range and wide color pixel formats

Formats that support extended dynamic range or wide color gamut displays.

[`MTLPixelFormat.bgra10_xr`](/documentation/Metal/MTLPixelFormat/bgra10_xr)

A 64-bit extended-range pixel format with four fixed-point components of 10-bit blue, 10-bit green, 10-bit red, and 10-bit alpha.

[`MTLPixelFormat.bgra10_xr_srgb`](/documentation/Metal/MTLPixelFormat/bgra10_xr_srgb)

A 64-bit extended-range pixel format with sRGB conversion and four fixed-point components of 10-bit blue, 10-bit green, 10-bit red, and 10-bit alpha.

[`MTLPixelFormat.bgr10_xr`](/documentation/Metal/MTLPixelFormat/bgr10_xr)

A 32-bit extended-range pixel format with three fixed-point components of 10-bit blue, 10-bit green, and 10-bit red.

[`MTLPixelFormat.bgr10_xr_srgb`](/documentation/Metal/MTLPixelFormat/bgr10_xr_srgb)

A 32-bit extended-range pixel format with sRGB conversion and three fixed-point components of 10-bit blue, 10-bit green, and 10-bit red.

### Sentinel values

Special values that represent something other than a pixel format.

[`MTLPixelFormat.invalid`](/documentation/Metal/MTLPixelFormat/invalid)

The default value of the pixel format for the `MTLRenderPipelineState`. You cannot create a texture with this value.



---

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)
