<!--
{
  "availability" : [
    "iOS: 27.0.0 -",
    "iPadOS: 27.0.0 -",
    "tvOS: 27.0.0 -",
    "visionOS: 27.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "RealityKit",
  "identifier" : "/documentation/RealityKit/LowLevelMeshResource/Attribute",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "RealityKit"
    ],
    "preciseIdentifier" : "s:19RealityCoreRenderer20LowLevelMeshResourceC9AttributeV"
  },
  "title" : "LowLevelMeshResource.Attribute"
}
-->

# LowLevelMeshResource.Attribute

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

```
struct Attribute
```

## Topics

### Initializers

[`init()`](/documentation/RealityKit/LowLevelMeshResource/Attribute/init())

Creates an attribute with all fields set to their zero/default values.

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

Creates an attribute with the given semantic, format, layout index, and byte offset.

### Instance Properties

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

The format of the vertex attribute.

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

The index of the layout that contains this attribute.

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

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

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

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

## Relationships

### Conforms To

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

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

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

---

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)