---
title: "encode(commandBuffer:)"
framework: metalfx
role: symbol
role_heading: Instance Method
path: "metalfx/mtl4fxtemporalscaler/encode(commandbuffer:)"
---

# encode(commandBuffer:)

Adds a scaling pass to a command buffer.

## Declaration

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

## Parameters

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