<!--
{
  "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.

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

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

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

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

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

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

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

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

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

Ordinary format with one 8-bit unsigned integer component.

[`MTLPixelFormatR8Sint`](/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.

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

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

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

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

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

Ordinary format with one 16-bit unsigned integer component.

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

Ordinary format with one 16-bit signed integer component.

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

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

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

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

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

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

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

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

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

Ordinary format with two 8-bit unsigned integer components.

[`MTLPixelFormatRG8Sint`](/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.

[`MTLPixelFormatB5G6R5Unorm`](/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.

[`MTLPixelFormatA1BGR5Unorm`](/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.

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

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

[`MTLPixelFormatBGR5A1Unorm`](/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.

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

Ordinary format with one 32-bit unsigned integer component.

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

Ordinary format with one 32-bit signed integer component.

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

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

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

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

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

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

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

Ordinary format with two 16-bit unsigned integer components.

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

Ordinary format with two 16-bit signed integer components.

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

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

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

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

[`MTLPixelFormatRGBA8Unorm_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.

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

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

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

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

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

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

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

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

[`MTLPixelFormatBGRA8Unorm_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.

[`MTLPixelFormatBGR10A2Unorm`](/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.

[`MTLPixelFormatRGB10A2Unorm`](/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.

[`MTLPixelFormatRGB10A2Uint`](/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.

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

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

[`MTLPixelFormatRGB9E5Float`](/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.

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

Ordinary format with two 32-bit unsigned integer components.

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

Ordinary format with two 32-bit signed integer components.

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

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

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

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

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

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

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

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

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

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

[`MTLPixelFormatRGBA16Float`](/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.

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

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

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

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

[`MTLPixelFormatRGBA32Float`](/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.

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

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

[`MTLPixelFormatPVRTC_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.

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

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

[`MTLPixelFormatPVRTC_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.

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

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

[`MTLPixelFormatPVRTC_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.

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

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

[`MTLPixelFormatPVRTC_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.

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

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

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

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

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

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

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

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

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

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

[`MTLPixelFormatEAC_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.

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

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

[`MTLPixelFormatETC2_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.

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

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

[`MTLPixelFormatETC2_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.

[`MTLPixelFormatASTC_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.

[`MTLPixelFormatASTC_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.

[`MTLPixelFormatASTC_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.

[`MTLPixelFormatASTC_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.

[`MTLPixelFormatASTC_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.

[`MTLPixelFormatASTC_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.

[`MTLPixelFormatASTC_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.

[`MTLPixelFormatASTC_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.

[`MTLPixelFormatASTC_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.

[`MTLPixelFormatASTC_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.

[`MTLPixelFormatASTC_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.

[`MTLPixelFormatASTC_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.

[`MTLPixelFormatASTC_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.

[`MTLPixelFormatASTC_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.

[`MTLPixelFormatASTC_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.

[`MTLPixelFormatASTC_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.

[`MTLPixelFormatASTC_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.

[`MTLPixelFormatASTC_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.

[`MTLPixelFormatASTC_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.

[`MTLPixelFormatASTC_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.

[`MTLPixelFormatASTC_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.

[`MTLPixelFormatASTC_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.

[`MTLPixelFormatASTC_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.

[`MTLPixelFormatASTC_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.

[`MTLPixelFormatASTC_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.

[`MTLPixelFormatASTC_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.

[`MTLPixelFormatASTC_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.

[`MTLPixelFormatASTC_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.

[`MTLPixelFormatASTC_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.

[`MTLPixelFormatASTC_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.

[`MTLPixelFormatASTC_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.

[`MTLPixelFormatASTC_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.

[`MTLPixelFormatASTC_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.

[`MTLPixelFormatASTC_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.

[`MTLPixelFormatASTC_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.

[`MTLPixelFormatASTC_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.

[`MTLPixelFormatASTC_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.

[`MTLPixelFormatASTC_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.

[`MTLPixelFormatASTC_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.

[`MTLPixelFormatASTC_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.

[`MTLPixelFormatASTC_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.

[`MTLPixelFormatASTC_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.

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

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

[`MTLPixelFormatBC1_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.

[`MTLPixelFormatBC2_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.

[`MTLPixelFormatBC2_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.

[`MTLPixelFormatBC3_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.

[`MTLPixelFormatBC3_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.

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

Compressed format with one normalized unsigned integer component.

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

Compressed format with one normalized signed integer component.

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

Compressed format with two normalized unsigned integer components.

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

Compressed format with two normalized signed integer components.

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

Compressed format with four floating-point components.

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

Compressed format with four unsigned floating-point components.

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

Compressed format with four normalized unsigned integer components.

[`MTLPixelFormatBC7_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.

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

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

[`MTLPixelFormatBGRG422`](/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.

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

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

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

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

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

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

[`MTLPixelFormatDepth24Unorm_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.

[`MTLPixelFormatDepth32Float_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.

[`MTLPixelFormatX32_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.

[`MTLPixelFormatX24_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.

[`MTLPixelFormatBGRA10_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.

[`MTLPixelFormatBGRA10_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.

[`MTLPixelFormatBGR10_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.

[`MTLPixelFormatBGR10_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.

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

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

## Relationships

### Conforms To

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

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

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

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

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

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

---

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)