---
title: "encode(commandBuffer:)"
framework: MetalFX
role: symbol
role_heading: Instance Method
platforms: [iOS 26.0+, iPadOS 26.0+, Mac Catalyst 26.0+, macOS 26.0+, tvOS 27.1+]
path: "metalfx/mtlfxframeinterpolator/encode(commandbuffer:)"
---

# encode(commandBuffer:)

Encode this frame interpolator’s work into a command buffer.

## Declaration

```swift
func encode(commandBuffer: any MTLCommandBuffer)
```

## Parameters

- `commandBuffer`: A command buffer into which this frame interpolator encodes work.
