<!--
{
  "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/MTLFXSpatialScalerDescriptor/makeSpatialScaler(device:compiler:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "MetalFX"
    ],
    "preciseIdentifier" : "c:objc(cs)MTLFXSpatialScalerDescriptor(im)newSpatialScalerWithDevice:compiler:"
  },
  "title" : "makeSpatialScaler(device:compiler:)"
}
-->

# makeSpatialScaler(device:compiler:)

Creates a spatial scaler instance for a Metal device.

```
func makeSpatialScaler(device: any MTLDevice, compiler: any MTL4Compiler) -> (any MTL4FXSpatialScaler)?
```

## Parameters

`device`

The Metal device that creates the spatial scaler.

`compiler`

A compiler instance this method can use to build pipeline state objects.

## Return Value


A new spatial scaler instance upon success, or `nil` otherwise.

---

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)