---
title: "generateMatte(from:commandBuffer:)"
framework: arkit
role: symbol
role_heading: Instance Method
path: "arkit/armattegenerator/generatematte(from:commandbuffer:)"
---

# generateMatte(from:commandBuffer:)

Generates alpha matte at either full resolution or half the resolution of the captured image.

## Declaration

```swift
func generateMatte(from frame: ARFrame, commandBuffer: any MTLCommandBuffer) -> any MTLTexture
```

## Return Value

Return Value An alpha matte texture at the resolution you chose at initialization.
