<!--
{
  "availability" : [
    "iOS: -",
    "iPadOS: -",
    "macCatalyst: -",
    "macOS: -",
    "tvOS: -",
    "visionOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "MetalPerformanceShaders",
  "identifier" : "/documentation/MetalPerformanceShaders/MPSImageEdgeMode",
  "metadataVersion" : "0.1.0",
  "role" : "Enumeration",
  "symbol" : {
    "kind" : "Enumeration",
    "modules" : [
      "Metal Performance Shaders"
    ],
    "preciseIdentifier" : "c:@E@MPSImageEdgeMode"
  },
  "title" : "MPSImageEdgeMode"
}
-->

# MPSImageEdgeMode

The options used to control the edge behavior of an image filter when it reads outside the bounds of a source texture.

```
enum MPSImageEdgeMode
```

## Topics

### Constants

[`MPSImageEdgeModeZero`](/documentation/MetalPerformanceShaders/MPSImageEdgeMode/zero)

Out-of-bound pixels are set to `(0.0, 0.0, 0.0, 1.0)` for images without an alpha channel or `(0.0, 0.0, 0.0, 0.0)` for images with an alpha channel, as defined by their pixel format.

[`MPSImageEdgeModeClamp`](/documentation/MetalPerformanceShaders/MPSImageEdgeMode/clamp)

Out-of-bound pixels are clamped to the nearest edge pixel.

## Relationships

### Conforms To

[`RawRepresentable`](/documentation/Swift/RawRepresentable)

[`Equatable`](/documentation/Swift/Equatable)

[`BitwiseCopyable`](/documentation/Swift/BitwiseCopyable)

[`SendableMetatype`](/documentation/Swift/SendableMetatype)

[`Sendable`](/documentation/Swift/Sendable)

[`Hashable`](/documentation/Swift/Hashable)

---

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)