<!--
{
  "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/init(bufferIndex:bufferOffset:bufferStride:stepFunction:stepRate:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "RealityKit"
    ],
    "preciseIdentifier" : "s:19RealityCoreRenderer20LowLevelMeshResourceC6LayoutV11bufferIndex0I6Offset0I6Stride12stepFunction0M4RateAESi_S2iSo013MTLVertexStepN0VSitcfc"
  },
  "title" : "init(bufferIndex:bufferOffset:bufferStride:stepFunction:stepRate:)"
}
-->

# init(bufferIndex:bufferOffset:bufferStride:stepFunction:stepRate:)

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

```
init(bufferIndex: Int, bufferOffset: Int = 0, bufferStride: Int, stepFunction: MTLVertexStepFunction = .perVertex, stepRate: Int = 1)
```

## Parameters

`bufferIndex`

The index of the buffer this layout refers to.

`bufferOffset`

The byte offset into the buffer for the first byte of this layout. Defaults to `0`.

`bufferStride`

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

`stepFunction`

How the vertex shader steps through this layout’s data. Defaults to `.perVertex`.

`stepRate`

The number of instances that share the same per-instance data. Defaults to `1`.

---

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)