---
title: "setPositionOffsets(_:offset:)"
framework: realitykit
role: symbol
role_heading: Instance Method
path: "realitykit/lowleveldeformation/blending-swift.struct/setpositionoffsets(_:offset:)"
---

# setPositionOffsets(_:offset:)

Sets the buffer containing blend-shape position offsets.

## Declaration

```swift
func setPositionOffsets(_ buffer: any MTLBuffer, offset: Int) throws(LowLevelDeformation.Error)
```

## Parameters

- `buffer`: The Metal buffer containing the blend-shape position offsets.
- `offset`: The byte offset into buffer where the data begins.

## Discussion

Discussion The buffer must contain targetCount × vertexCount entries in the same format as the input mesh’s .position attribute. note: If offset is out of bounds for buffer, or if the buffer is too small.

## See Also

### Setting blend data

- [setNormalOffsets(_:offset:)](realitykit/lowleveldeformation/blending-swift.struct/setnormaloffsets(_:offset:).md)
- [setTangentOffsets(_:offset:)](realitykit/lowleveldeformation/blending-swift.struct/settangentoffsets(_:offset:).md)
- [setWeights(_:offset:)](realitykit/lowleveldeformation/blending-swift.struct/setweights(_:offset:).md)
