<!--
{
  "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/MTLVertexAttribute",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "Metal"
    ],
    "preciseIdentifier" : "c:objc(cs)MTLVertexAttribute"
  },
  "title" : "MTLVertexAttribute"
}
-->

# MTLVertexAttribute

An instance that represents an attribute of a vertex function.

```
class MTLVertexAttribute
```

## Overview

An [`MTLVertexAttribute`](/documentation/Metal/MTLVertexAttribute) instance represents an attribute for per-vertex input in a vertex function. You use vertex attribute instances to inspect the inputs of a vertex function by examining the [`vertexAttributes`](/documentation/Metal/MTLFunction/vertexAttributes) property of the corresponding [`MTLFunction`](/documentation/Metal/MTLFunction) instance.

## Topics

### Describing the attribute

[`name`](/documentation/Metal/MTLVertexAttribute/name)

The name of the attribute.

[`attributeIndex`](/documentation/Metal/MTLVertexAttribute/attributeIndex)

The index of the attribute, as declared in Metal shader source code.

[`attributeType`](/documentation/Metal/MTLVertexAttribute/attributeType)

The data type for the attribute, as declared in Metal shader source code.

[`isActive`](/documentation/Metal/MTLVertexAttribute/isActive)

A Boolean value that indicates whether this vertex attribute is active.

[`isPatchControlPointData`](/documentation/Metal/MTLVertexAttribute/isPatchControlPointData)

A Boolean value that indicates whether this vertex attribute represents control point data.

[`isPatchData`](/documentation/Metal/MTLVertexAttribute/isPatchData)

A Boolean value that indicates whether this vertex attribute represents patch data.



---

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)