<!--
{
  "availability" : [
    "iOS: 9.0.0 -",
    "iPadOS: 9.0.0 -",
    "macCatalyst: 13.0.0 -",
    "macOS: 10.11.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "ModelIO",
  "identifier" : "/documentation/ModelIO/MDLVertexFormat",
  "metadataVersion" : "0.1.0",
  "role" : "Enumeration",
  "symbol" : {
    "kind" : "Enumeration",
    "modules" : [
      "Model I/O"
    ],
    "preciseIdentifier" : "c:@E@MDLVertexFormat"
  },
  "title" : "MDLVertexFormat"
}
-->

# MDLVertexFormat

Descriptions of the data size and layout for a vertex attribute, used by the [`format`](/documentation/ModelIO/MDLVertexAttribute/format) property.

```
enum MDLVertexFormat
```

## Overview

The values for vertex formats are constructed such that you can use bit masks to infer useful information about a format:

- The lowest order byte contains the number of vector components in a vertex format. For example, the raw value for the [`MDLVertexFormat.char3`](/documentation/ModelIO/MDLVertexFormat/char3) format is the bitwise OR of the 3 (the number of components) with the [`MDLVertexFormat.charBits`](/documentation/ModelIO/MDLVertexFormat/charBits) value.
- Special packed formats such as [`MDLVertexFormat.int1010102Normalized`](/documentation/ModelIO/MDLVertexFormat/int1010102Normalized) have values less than `0x10000`.
- For unpacked formats, masking away the lower four bytes leaves information about the data type for scalars or vector components.

## Topics

### Constants

[`MDLVertexFormatInvalid`](/documentation/ModelIO/MDLVertexFormat/invalid)

The vertex attribute has just been initialized or its format is unknown.

[`MDLVertexFormatPackedBit`](/documentation/ModelIO/MDLVertexFormat/packedBit)

A bit mask for vertex attributes in packed vector formats.

[`MDLVertexFormatUCharBits`](/documentation/ModelIO/MDLVertexFormat/uCharBits)

A bit mask for vertex attributes whose components are in 8-bit unsigned integer format.

[`MDLVertexFormatCharBits`](/documentation/ModelIO/MDLVertexFormat/charBits)

A bit mask for vertex attributes whose components are in 8-bit signed integer format.

[`MDLVertexFormatUCharNormalizedBits`](/documentation/ModelIO/MDLVertexFormat/uCharNormalizedBits)

A bit mask for vertex attributes whose components are in 8-bit unsigned normalized integer format.

[`MDLVertexFormatCharNormalizedBits`](/documentation/ModelIO/MDLVertexFormat/charNormalizedBits)

A bit mask for vertex attributes whose components are in 8-bit signed normalized integer format.

[`MDLVertexFormatUShortBits`](/documentation/ModelIO/MDLVertexFormat/uShortBits)

A bit mask for vertex attributes whose components are in 16-bit unsigned integer format.

[`MDLVertexFormatShortBits`](/documentation/ModelIO/MDLVertexFormat/shortBits)

A bit mask for vertex attributes whose components are in 16-bit signed integer format.

[`MDLVertexFormatUShortNormalizedBits`](/documentation/ModelIO/MDLVertexFormat/uShortNormalizedBits)

A bit mask for vertex attributes whose components are in 16-bit unsigned normalized integer format.

[`MDLVertexFormatShortNormalizedBits`](/documentation/ModelIO/MDLVertexFormat/shortNormalizedBits)

A bit mask for vertex attributes whose components are in 16-bit signed normalized integer format.

[`MDLVertexFormatUIntBits`](/documentation/ModelIO/MDLVertexFormat/uIntBits)

A bit mask for vertex attributes whose components are in 32-bit unsigned integer format.

[`MDLVertexFormatIntBits`](/documentation/ModelIO/MDLVertexFormat/intBits)

A bit mask for vertex attributes whose components are in 32-bit signed integer format.

[`MDLVertexFormatHalfBits`](/documentation/ModelIO/MDLVertexFormat/halfBits)

A bit mask for vertex attributes whose components are in 16-bit floating-point format.

[`MDLVertexFormatFloatBits`](/documentation/ModelIO/MDLVertexFormat/floatBits)

A bit mask for vertex attributes whose components are in 32-bit floating-point format.

[`MDLVertexFormatUChar`](/documentation/ModelIO/MDLVertexFormat/uChar)

The attribute value for each vertex is a scalar of unsigned 8-bit integer type.

[`MDLVertexFormatUChar2`](/documentation/ModelIO/MDLVertexFormat/uChar2)

The attribute value for each vertex is a vector with 2 components, each of unsigned 8-bit integer type.

[`MDLVertexFormatUChar3`](/documentation/ModelIO/MDLVertexFormat/uChar3)

The attribute value for each vertex is a vector with 3 components, each of unsigned 8-bit integer type.

[`MDLVertexFormatUChar4`](/documentation/ModelIO/MDLVertexFormat/uChar4)

The attribute value for each vertex is a vector with 4 components, each of unsigned 8-bit integer type.

[`MDLVertexFormatChar`](/documentation/ModelIO/MDLVertexFormat/char)

The attribute value for each vertex is a scalar of signed 8-bit integer type.

[`MDLVertexFormatChar2`](/documentation/ModelIO/MDLVertexFormat/char2)

The attribute value for each vertex is a vector with 2 components, each of signed 8-bit integer type.

[`MDLVertexFormatChar3`](/documentation/ModelIO/MDLVertexFormat/char3)

The attribute value for each vertex is a vector with 3 components, each of signed 8-bit integer type.

[`MDLVertexFormatChar4`](/documentation/ModelIO/MDLVertexFormat/char4)

The attribute value for each vertex is a vector with 4 components, each of signed 8-bit integer type.

[`MDLVertexFormatUCharNormalized`](/documentation/ModelIO/MDLVertexFormat/uCharNormalized)

The attribute value for each vertex is a normalized scalar of unsigned 8-bit integer type.

[`MDLVertexFormatUChar2Normalized`](/documentation/ModelIO/MDLVertexFormat/uChar2Normalized)

The attribute value for each vertex is a vector with 2 components, each with a normalized value of unsigned 8-bit integer type.

[`MDLVertexFormatUChar3Normalized`](/documentation/ModelIO/MDLVertexFormat/uChar3Normalized)

The attribute value for each vertex is a vector with 3 components, each with a normalized value of unsigned 8-bit integer type.

[`MDLVertexFormatUChar4Normalized`](/documentation/ModelIO/MDLVertexFormat/uChar4Normalized)

The attribute value for each vertex is a vector with 4 components, each with a normalized value of unsigned 8-bit integer type.

[`MDLVertexFormatCharNormalized`](/documentation/ModelIO/MDLVertexFormat/charNormalized)

The attribute value for each vertex is a normalized scalar of signed 8-bit integer type.

[`MDLVertexFormatChar2Normalized`](/documentation/ModelIO/MDLVertexFormat/char2Normalized)

The attribute value for each vertex is a vector with 2 components, each with a normalized value of signed 8-bit integer type.

[`MDLVertexFormatChar3Normalized`](/documentation/ModelIO/MDLVertexFormat/char3Normalized)

The attribute value for each vertex is a vector with 3 components, each with a normalized value of signed 8-bit integer type.

[`MDLVertexFormatChar4Normalized`](/documentation/ModelIO/MDLVertexFormat/char4Normalized)

The attribute value for each vertex is a vector with 4 components, each with a normalized value of signed 8-bit integer type.

[`MDLVertexFormatUShort`](/documentation/ModelIO/MDLVertexFormat/uShort)

The attribute value for each vertex is a scalar of unsigned 16-bit integer type.

[`MDLVertexFormatUShort2`](/documentation/ModelIO/MDLVertexFormat/uShort2)

The attribute value for each vertex is a vector with 2 components, each of unsigned 16-bit integer type.

[`MDLVertexFormatUShort3`](/documentation/ModelIO/MDLVertexFormat/uShort3)

The attribute value for each vertex is a vector with 3 components, each of unsigned 16-bit integer type.

[`MDLVertexFormatUShort4`](/documentation/ModelIO/MDLVertexFormat/uShort4)

The attribute value for each vertex is a vector with 4 components, each of unsigned 16-bit integer type.

[`MDLVertexFormatShort`](/documentation/ModelIO/MDLVertexFormat/short)

The attribute value for each vertex is a scalar of signed 16-bit integer type.

[`MDLVertexFormatShort2`](/documentation/ModelIO/MDLVertexFormat/short2)

The attribute value for each vertex is a vector with 2 components, each of signed 16-bit integer type.

[`MDLVertexFormatShort3`](/documentation/ModelIO/MDLVertexFormat/short3)

The attribute value for each vertex is a vector with 3 components, each of signed 16-bit integer type.

[`MDLVertexFormatShort4`](/documentation/ModelIO/MDLVertexFormat/short4)

The attribute value for each vertex is a vector with 4 components, each of signed 16-bit integer type.

[`MDLVertexFormatUShortNormalized`](/documentation/ModelIO/MDLVertexFormat/uShortNormalized)

The attribute value for each vertex is a normalized scalar of unsigned 16-bit integer type.

[`MDLVertexFormatUShort2Normalized`](/documentation/ModelIO/MDLVertexFormat/uShort2Normalized)

The attribute value for each vertex is a vector with 2 components, each with a normalized value of unsigned 16-bit integer type.

[`MDLVertexFormatUShort3Normalized`](/documentation/ModelIO/MDLVertexFormat/uShort3Normalized)

The attribute value for each vertex is a vector with 3 components, each with a normalized value of unsigned 16-bit integer type.

[`MDLVertexFormatUShort4Normalized`](/documentation/ModelIO/MDLVertexFormat/uShort4Normalized)

The attribute value for each vertex is a vector with 4 components, each with a normalized value of unsigned 16-bit integer type.

[`MDLVertexFormatShortNormalized`](/documentation/ModelIO/MDLVertexFormat/shortNormalized)

The attribute value for each vertex is a normalized scalar of signed 16-bit integer type.

[`MDLVertexFormatShort2Normalized`](/documentation/ModelIO/MDLVertexFormat/short2Normalized)

The attribute value for each vertex is a vector with 2 components, each with a normalized value of signed 16-bit integer type.

[`MDLVertexFormatShort3Normalized`](/documentation/ModelIO/MDLVertexFormat/short3Normalized)

The attribute value for each vertex is a vector with 3 components, each with a normalized value of signed 16-bit integer type.

[`MDLVertexFormatShort4Normalized`](/documentation/ModelIO/MDLVertexFormat/short4Normalized)

The attribute value for each vertex is a vector with 4 components, each with a normalized value of signed 16-bit integer type.

[`MDLVertexFormatUInt`](/documentation/ModelIO/MDLVertexFormat/uInt)

The attribute value for each vertex is a scalar of unsigned 32-bit integer type.

[`MDLVertexFormatUInt2`](/documentation/ModelIO/MDLVertexFormat/uInt2)

The attribute value for each vertex is a vector with 2 components, each of unsigned 32-bit integer type.

[`MDLVertexFormatUInt3`](/documentation/ModelIO/MDLVertexFormat/uInt3)

The attribute value for each vertex is a vector with 3 components, each of unsigned 32-bit integer type.

[`MDLVertexFormatUInt4`](/documentation/ModelIO/MDLVertexFormat/uInt4)

The attribute value for each vertex is a vector with 4 components, each of unsigned 32-bit integer type.

[`MDLVertexFormatInt`](/documentation/ModelIO/MDLVertexFormat/int)

The attribute value for each vertex is a scalar of signed 32-bit integer type.

[`MDLVertexFormatInt2`](/documentation/ModelIO/MDLVertexFormat/int2)

The attribute value for each vertex is a vector with 2 components, each of signed 32-bit integer type.

[`MDLVertexFormatInt3`](/documentation/ModelIO/MDLVertexFormat/int3)

The attribute value for each vertex is a vector with 3 components, each of signed 32-bit integer type.

[`MDLVertexFormatInt4`](/documentation/ModelIO/MDLVertexFormat/int4)

The attribute value for each vertex is a vector with 4 components, each of signed 32-bit integer type.

[`MDLVertexFormatHalf`](/documentation/ModelIO/MDLVertexFormat/half)

The attribute value for each vertex is a scalar of 16-bit floating-point type.

[`MDLVertexFormatHalf2`](/documentation/ModelIO/MDLVertexFormat/half2)

The attribute value for each vertex is a vector with 2 components, each of 16-bit floating-point type.

[`MDLVertexFormatHalf3`](/documentation/ModelIO/MDLVertexFormat/half3)

The attribute value for each vertex is a vector with 3 components, each of 16-bit floating-point type.

[`MDLVertexFormatHalf4`](/documentation/ModelIO/MDLVertexFormat/half4)

The attribute value for each vertex is a vector with 4 components, each of 16-bit floating-point type.

[`MDLVertexFormatFloat`](/documentation/ModelIO/MDLVertexFormat/float)

The attribute value for each vertex is a scalar of 32-bit floating-point type.

[`MDLVertexFormatFloat2`](/documentation/ModelIO/MDLVertexFormat/float2)

The attribute value for each vertex is a vector with 2 components, each of 32-bit floating-point type.

[`MDLVertexFormatFloat3`](/documentation/ModelIO/MDLVertexFormat/float3)

The attribute value for each vertex is a vector with 3 components, each of 32-bit floating-point type.

[`MDLVertexFormatFloat4`](/documentation/ModelIO/MDLVertexFormat/float4)

The attribute value for each vertex is a vector with 4 components, each of 32-bit floating-point type.

[`MDLVertexFormatInt1010102Normalized`](/documentation/ModelIO/MDLVertexFormat/int1010102Normalized)

The attribute value for each vertex is a packed vector with 4 components of signed integer type. The first three components are 10 bits each, and the fourth component is 2 bits.

[`MDLVertexFormatUInt1010102Normalized`](/documentation/ModelIO/MDLVertexFormat/uInt1010102Normalized)

The attribute value for each vertex is a packed vector with 4 components of unsigned integer type. The first three components are 10 bits each, and the fourth component is 2 bits.

## Relationships

### Conforms To

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

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

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

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

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

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

---

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)