<!--
{
  "availability" : [
    "iOS: 26.0.0 -",
    "iPadOS: 26.0.0 -",
    "macCatalyst: 26.0.0 -",
    "macOS: 26.0.0 -",
    "tvOS: 27.1.0 -",
    "visionOS: 26.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "MetalFX",
  "identifier" : "/documentation/MetalFX/MTL4FXSpatialScaler",
  "metadataVersion" : "0.1.0",
  "role" : "Protocol",
  "symbol" : {
    "kind" : "Protocol",
    "modules" : [
      "MetalFX"
    ],
    "preciseIdentifier" : "c:objc(pl)MTL4FXSpatialScaler"
  },
  "title" : "MTL4FXSpatialScaler"
}
-->

# MTL4FXSpatialScaler

An upscaling effect that generates a higher resolution texture in a render pass by spatially analyzing an input texture.

```
protocol MTL4FXSpatialScaler : MTLFXSpatialScalerBase
```

## Overview

You create instances of this class by calling [`makeSpatialScaler(device:compiler:)`](/documentation/MetalFX/MTLFXSpatialScalerDescriptor/makeSpatialScaler(device:compiler:)).

When using instances of objects conforming to this protocol, you configure the different properties it
inherits from protocol [`MTLFXSpatialScalerBase`](/documentation/MetalFX/MTLFXSpatialScalerBase) and then call [`encode(commandBuffer:)`](/documentation/MetalFX/MTL4FXSpatialScaler/encode(commandBuffer:)) to
encode its work into a Metal command buffer.

See [`MTLFXSpatialScalerBase`](/documentation/MetalFX/MTLFXSpatialScalerBase) for more details on configuring and using spatial scalers.

## Topics

### Instance Methods

[`func encode(commandBuffer: any MTL4CommandBuffer)`](/documentation/MetalFX/MTL4FXSpatialScaler/encode(commandBuffer:))

Encode this spatial scaler work into a command buffer.

## Relationships

### Inherits From

[`NSObjectProtocol`](/documentation/ObjectiveC/NSObjectProtocol)

[`MTLFXSpatialScalerBase`](/documentation/MetalFX/MTLFXSpatialScalerBase)

---

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)