<!--
{
  "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/MTLVertexFormat",
  "metadataVersion" : "0.1.0",
  "role" : "Enumeration",
  "symbol" : {
    "kind" : "Enumeration",
    "modules" : [
      "Metal"
    ],
    "preciseIdentifier" : "c:@E@MTLVertexFormat"
  },
  "title" : "MTLVertexFormat"
}
-->

# MTLVertexFormat

The vertex data format options for render pipelines.

```
enum MTLVertexFormat
```

## Overview

Set the [`format`](/documentation/Metal/MTLVertexAttributeDescriptor/format) property of [`MTLVertexAttributeDescriptor`](/documentation/Metal/MTLVertexAttributeDescriptor) to one of these format values.
The format configures how Metal interprets the vertex data in memory for the corresponding argument in your vertex shader.
Choose a format that matches the type and component count the shader expects.

### Normalized integer formats

Normalized signed integer formats have `Normalized` in the name and signed types like [`MTLVertexFormat.char`](/documentation/Metal/MTLVertexFormat/char) or [`MTLVertexFormat.short`](/documentation/Metal/MTLVertexFormat/short).
For these formats, 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 normalized signed integer formats, the values `MIN_INT` and `(MIN_INT + 1)` both map to `-1.0`.

Normalized unsigned integer formats have `Normalized` in the name and unsigned types like [`MTLVertexFormat.uchar`](/documentation/Metal/MTLVertexFormat/uchar) or [`MTLVertexFormat.ushort`](/documentation/Metal/MTLVertexFormat/ushort).
For these formats, values in the range `[0.0, 1.0]` map to `[0, MAX_UINT]`, where `MAX_UINT` is the largest unsigned integer for the number of bits in the storage size.

Metal stores data in little-endian byte order, with the least-significant byte at the lowest memory address.
Formats with multibyte components also store each component in little-endian byte order.

## Topics

### 32-bit floating-point formats

Formats for high-precision floating-point vertex data.

[`MTLVertexFormat.float`](/documentation/Metal/MTLVertexFormat/float)

A 32-bit floating-point value.

[`MTLVertexFormat.float2`](/documentation/Metal/MTLVertexFormat/float2)

A two-component vector with 32-bit floating-point values.

[`MTLVertexFormat.float3`](/documentation/Metal/MTLVertexFormat/float3)

A three-component vector with 32-bit floating-point values.

[`MTLVertexFormat.float4`](/documentation/Metal/MTLVertexFormat/float4)

A four-component vector with 32-bit floating-point values.

[`MTLVertexFormat.floatRG11B10`](/documentation/Metal/MTLVertexFormat/floatRG11B10)

A three-component vector with 11-bit floating-point values for red and green, and a 10-bit value for blue.

[`MTLVertexFormat.floatRGB9E5`](/documentation/Metal/MTLVertexFormat/floatRGB9E5)

A three-component vector with 9-bit floating-point values for red, green, and blue, and a 5-bit shared exponent.

### 32-bit integer formats

Formats for full-range integer vertex data.

[`MTLVertexFormat.int`](/documentation/Metal/MTLVertexFormat/int)

A 32-bit, signed integer value.

[`MTLVertexFormat.int2`](/documentation/Metal/MTLVertexFormat/int2)

A two-component vector with 32-bit, signed integer values.

[`MTLVertexFormat.int3`](/documentation/Metal/MTLVertexFormat/int3)

A three-component vector with 32-bit, signed integer values.

[`MTLVertexFormat.int4`](/documentation/Metal/MTLVertexFormat/int4)

A four-component vector with 32-bit, signed integer values.

[`MTLVertexFormat.uint`](/documentation/Metal/MTLVertexFormat/uint)

A 32-bit, unsigned integer value.

[`MTLVertexFormat.uint2`](/documentation/Metal/MTLVertexFormat/uint2)

A two-component vector with 32-bit, unsigned integer values.

[`MTLVertexFormat.uint3`](/documentation/Metal/MTLVertexFormat/uint3)

A three-component vector with 32-bit, unsigned integer values.

[`MTLVertexFormat.uint4`](/documentation/Metal/MTLVertexFormat/uint4)

A four-component vector with 32-bit, unsigned integer values.

### 32-bit normalized integer formats

Formats that store integer data in memory but the GPU interprets as floating-point values in the range `[0.0, 1.0]` or `[-1.0, 1.0]`.

[`MTLVertexFormat.int1010102Normalized`](/documentation/Metal/MTLVertexFormat/int1010102Normalized)

A four-component vector with 10-bit, normalized, signed integer values for red, green, and blue, and a 2-bit value for alpha.

[`MTLVertexFormat.uint1010102Normalized`](/documentation/Metal/MTLVertexFormat/uint1010102Normalized)

A four-component vector with 10-bit, normalized, unsigned integer values for red, green, and blue, and a 2-bit value for alpha.

[`MTLVertexFormat.uchar4Normalized_bgra`](/documentation/Metal/MTLVertexFormat/uchar4Normalized_bgra)

A four-component vector with 8-bit, normalized, unsigned integer values for blue, green, red, and alpha.

### 16-bit floating-point formats

Formats for half-precision floating-point vertex data that reduce memory bandwidth.

[`MTLVertexFormat.half`](/documentation/Metal/MTLVertexFormat/half)

A 16-bit floating-point value.

[`MTLVertexFormat.half2`](/documentation/Metal/MTLVertexFormat/half2)

A two-component vector with 16-bit floating-point values.

[`MTLVertexFormat.half3`](/documentation/Metal/MTLVertexFormat/half3)

A three-component vector with 16-bit floating-point values.

[`MTLVertexFormat.half4`](/documentation/Metal/MTLVertexFormat/half4)

A four-component vector with 16-bit floating-point values.

### 16-bit integer formats

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

[`MTLVertexFormat.short`](/documentation/Metal/MTLVertexFormat/short)

A 16-bit, signed integer value.

[`MTLVertexFormat.short2`](/documentation/Metal/MTLVertexFormat/short2)

A two-component vector with 16-bit, signed integer values.

[`MTLVertexFormat.short3`](/documentation/Metal/MTLVertexFormat/short3)

A three-component vector with 16-bit, signed integer values.

[`MTLVertexFormat.short4`](/documentation/Metal/MTLVertexFormat/short4)

A four-component vector with 16-bit, signed integer values.

[`MTLVertexFormat.ushort`](/documentation/Metal/MTLVertexFormat/ushort)

A 16-bit, unsigned integer value.

[`MTLVertexFormat.ushort2`](/documentation/Metal/MTLVertexFormat/ushort2)

A two-component vector with 16-bit, unsigned integer values.

[`MTLVertexFormat.ushort3`](/documentation/Metal/MTLVertexFormat/ushort3)

A three-component vector with 16-bit, unsigned integer values.

[`MTLVertexFormat.ushort4`](/documentation/Metal/MTLVertexFormat/ushort4)

A four-component vector with 16-bit, unsigned integer values.

### 16-bit normalized integer formats

Formats that store integer data in memory but the GPU interprets as floating-point values in the range `[0.0, 1.0]` or `[-1.0, 1.0]`.

[`MTLVertexFormat.shortNormalized`](/documentation/Metal/MTLVertexFormat/shortNormalized)

A 16-bit, normalized, signed integer value.

[`MTLVertexFormat.short2Normalized`](/documentation/Metal/MTLVertexFormat/short2Normalized)

A two-component vector with 16-bit, normalized, signed integer values.

[`MTLVertexFormat.short3Normalized`](/documentation/Metal/MTLVertexFormat/short3Normalized)

A three-component vector with 16-bit, normalized, signed integer values.

[`MTLVertexFormat.short4Normalized`](/documentation/Metal/MTLVertexFormat/short4Normalized)

A four-component vector with 16-bit, normalized, signed integer values.

[`MTLVertexFormat.ushortNormalized`](/documentation/Metal/MTLVertexFormat/ushortNormalized)

A 16-bit, normalized, unsigned integer value.

[`MTLVertexFormat.ushort2Normalized`](/documentation/Metal/MTLVertexFormat/ushort2Normalized)

A two-component vector with 16-bit, normalized, unsigned integer values.

[`MTLVertexFormat.ushort3Normalized`](/documentation/Metal/MTLVertexFormat/ushort3Normalized)

A three-component vector with 16-bit, normalized, unsigned integer values.

[`MTLVertexFormat.ushort4Normalized`](/documentation/Metal/MTLVertexFormat/ushort4Normalized)

A four-component vector with 16-bit, normalized, unsigned integer values.

### 8-bit integer formats

Formats for compact integer vertex data that reduce memory bandwidth.

[`MTLVertexFormat.char`](/documentation/Metal/MTLVertexFormat/char)

An 8-bit, signed integer value.

[`MTLVertexFormat.char2`](/documentation/Metal/MTLVertexFormat/char2)

A two-component vector with 8-bit, signed integer values.

[`MTLVertexFormat.char3`](/documentation/Metal/MTLVertexFormat/char3)

A three-component vector with 8-bit, signed integer values.

[`MTLVertexFormat.char4`](/documentation/Metal/MTLVertexFormat/char4)

A four-component vector with 8-bit, signed integer values.

[`MTLVertexFormat.uchar`](/documentation/Metal/MTLVertexFormat/uchar)

An 8-bit, unsigned integer value.

[`MTLVertexFormat.uchar2`](/documentation/Metal/MTLVertexFormat/uchar2)

A two-component vector with 8-bit, unsigned integer values.

[`MTLVertexFormat.uchar3`](/documentation/Metal/MTLVertexFormat/uchar3)

A three-component vector with 8-bit, unsigned integer values.

[`MTLVertexFormat.uchar4`](/documentation/Metal/MTLVertexFormat/uchar4)

A four-component vector with 8-bit, unsigned integer values.

### 8-bit normalized integer formats

Formats that store integer data in memory but the GPU interprets as floating-point values in the range `[0.0, 1.0]` or `[-1.0, 1.0]`.

[`MTLVertexFormat.charNormalized`](/documentation/Metal/MTLVertexFormat/charNormalized)

An 8-bit, normalized, signed integer value.

[`MTLVertexFormat.char2Normalized`](/documentation/Metal/MTLVertexFormat/char2Normalized)

A two-component vector with 8-bit, normalized, signed integer values.

[`MTLVertexFormat.char3Normalized`](/documentation/Metal/MTLVertexFormat/char3Normalized)

A three-component vector with 8-bit, normalized, signed integer values.

[`MTLVertexFormat.char4Normalized`](/documentation/Metal/MTLVertexFormat/char4Normalized)

A four-component vector with 8-bit, normalized, signed integer values.

[`MTLVertexFormat.ucharNormalized`](/documentation/Metal/MTLVertexFormat/ucharNormalized)

An 8-bit, normalized, unsigned integer value.

[`MTLVertexFormat.uchar2Normalized`](/documentation/Metal/MTLVertexFormat/uchar2Normalized)

A two-component vector with 8-bit, normalized, unsigned integer values.

[`MTLVertexFormat.uchar3Normalized`](/documentation/Metal/MTLVertexFormat/uchar3Normalized)

A three-component vector with 8-bit, normalized, unsigned integer values.

[`MTLVertexFormat.uchar4Normalized`](/documentation/Metal/MTLVertexFormat/uchar4Normalized)

A four-component vector with 8-bit, normalized, unsigned integer values.

### Sentinel values

Special values that represent something other than a vertex format.

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

A sentinel value that represents an empty set of vertex format options.

### Swift support

[`init(rawValue:)`](/documentation/Metal/MTLVertexFormat/init(rawValue:))

Creates a vertex format from a raw integer 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)