<!--
{
  "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/stepFunction",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "RealityKit"
    ],
    "preciseIdentifier" : "s:19RealityCoreRenderer20LowLevelMeshResourceC6LayoutV12stepFunctionSo013MTLVertexStepJ0Vvp"
  },
  "title" : "stepFunction"
}
-->

# stepFunction

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

```
var stepFunction: MTLVertexStepFunction { get set }
```

## Discussion

Set to `.perInstance` to supply per-instance data (for example, per-instance
color or transform) from a vertex buffer rather than a separate instancing
buffer. Defaults to `.perVertex`.

Corresponds to `MTLVertexBufferLayoutDescriptor.stepFunction`.

---

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)