<!--
{
  "availability" : [
    "iOS: 18.0.0 -",
    "iPadOS: 18.0.0 -",
    "macCatalyst: 18.0.0 -",
    "macOS: 15.0.0 -",
    "tvOS: 26.0.0 -",
    "visionOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "RealityKit",
  "identifier" : "/documentation/RealityKit/LowLevelMesh/Attribute",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "RealityKit"
    ],
    "preciseIdentifier" : "s:17RealityFoundation12LowLevelMeshC9AttributeV"
  },
  "title" : "LowLevelMesh.Attribute"
}
-->

# LowLevelMesh.Attribute

An object that determines how to store vertex attribute data in memory and map it to
RealityKit shader attributes.

```
struct Attribute
```

## Topics

### Creating a vertex attribute

[`init(semantic: LowLevelMesh.VertexSemantic, format: MTLVertexFormat, layoutIndex: Int, offset: Int)`](/documentation/RealityKit/LowLevelMesh/Attribute/init(semantic:format:layoutIndex:offset:))

Creates an attribute for a low-level mesh.

### Describing an attribute

[`var format: MTLVertexFormat`](/documentation/RealityKit/LowLevelMesh/Attribute/format)

The format of the vertex attribute.

[`var offset: Int`](/documentation/RealityKit/LowLevelMesh/Attribute/offset)

The location of an attribute in vertex data, determined by the byte offset
from the start of the vertex data.

[`var layoutIndex: Int`](/documentation/RealityKit/LowLevelMesh/Attribute/layoutIndex)

The index of the layout that contains this attribute.

[`var semantic: LowLevelMesh.VertexSemantic`](/documentation/RealityKit/LowLevelMesh/Attribute/semantic)

The semantic of the vertex attribute, which describes how you want RealityKit to interpret the attribute.

## Relationships

### Conforms To

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

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

---

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)