<!--
{
  "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/init(semantic:format:layoutIndex:offset:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "RealityKit"
    ],
    "preciseIdentifier" : "s:19RealityCoreRenderer20LowLevelMeshResourceC9AttributeV8semantic6format11layoutIndex6offsetAeC14VertexSemanticO_So15MTLVertexFormatVS2itcfc"
  },
  "title" : "init(semantic:format:layoutIndex:offset:)"
}
-->

# init(semantic:format:layoutIndex:offset:)

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

```
init(semantic: LowLevelMeshResource.VertexSemantic, format: MTLVertexFormat, layoutIndex: Int = 0, offset: Int)
```

## Parameters

`semantic`

The semantic describing how the renderer interprets this attribute.

`format`

The Metal vertex format of the attribute.

`layoutIndex`

The index of the layout that contains this attribute. Defaults to `0`.

`offset`

The byte offset of this attribute from the start of the vertex 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)