<!--
{
  "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/Layout",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "RealityKit"
    ],
    "preciseIdentifier" : "s:19RealityCoreRenderer20LowLevelMeshResourceC6LayoutV"
  },
  "title" : "LowLevelMeshResource.Layout"
}
-->

# LowLevelMeshResource.Layout

An object that describes a set of attributes that share a buffer index, offset, and stride.

```
struct Layout
```

## Overview

If you interleave your data (that is, represent it with a structure), use one `Layout` object
where `bufferStride` equals `MemoryLayout<Type>.stride`. If you store attributes
separately, use one `Layout` per attribute.

## Topics

### Creating a layout

[`init(bufferIndex: Int, bufferOffset: Int, bufferStride: Int, stepFunction: MTLVertexStepFunction, stepRate: Int)`](/documentation/RealityKit/LowLevelMeshResource/Layout/init(bufferIndex:bufferOffset:bufferStride:stepFunction:stepRate:))

Creates a layout with the given buffer index, offset, stride, step function, and step rate.

### Configuring vertex stepping

[`var stepFunction: MTLVertexStepFunction`](/documentation/RealityKit/LowLevelMeshResource/Layout/stepFunction)

Determines how the vertex shader steps through the data in this layout.

[`var stepRate: Int`](/documentation/RealityKit/LowLevelMeshResource/Layout/stepRate)

The number of instances that share the same per-instance vertex data.

### Initializers

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

Creates a layout with all fields set to their zero/default values.

### Instance Properties

[`var bufferIndex: Int`](/documentation/RealityKit/LowLevelMeshResource/Layout/bufferIndex)

The index of the buffer to use for this layout.

[`var bufferOffset: Int`](/documentation/RealityKit/LowLevelMeshResource/Layout/bufferOffset)

The byte offset into the buffer for the first byte of this layout.

[`var bufferStride: Int`](/documentation/RealityKit/LowLevelMeshResource/Layout/bufferStride)

The distance, in bytes, between consecutive vertices for attributes using this layout.

## Relationships

### Conforms To

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

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

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

---

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)