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

# MTLSamplerAddressMode

Modes that determine the texture coordinate at each pixel when a fetch falls outside the bounds of a texture.

```
enum MTLSamplerAddressMode
```

## Topics

### Address mode options

[`MTLSamplerAddressModeClampToEdge`](/documentation/Metal/MTLSamplerAddressMode/clampToEdge)

Texture coordinates are clamped between `0.0` and `1.0`, inclusive.

[`MTLSamplerAddressModeMirrorClampToEdge`](/documentation/Metal/MTLSamplerAddressMode/mirrorClampToEdge)

Between `-1.0` and `1.0`, the texture coordinates are mirrored across the axis; outside `-1.0` and `1.0`, texture coordinates are clamped.

[`MTLSamplerAddressModeRepeat`](/documentation/Metal/MTLSamplerAddressMode/repeat)

Texture coordinates wrap to the other side of the texture, effectively keeping only the fractional part of the texture coordinate.

[`MTLSamplerAddressModeMirrorRepeat`](/documentation/Metal/MTLSamplerAddressMode/mirrorRepeat)

Between `-1.0` and `1.0`, the texture coordinates are mirrored across the axis; outside `-1.0` and `1.0`, the image is repeated.

[`MTLSamplerAddressModeClampToZero`](/documentation/Metal/MTLSamplerAddressMode/clampToZero)

Out-of-range texture coordinates return transparent zero `(0,0,0,0)` for images with an alpha channel and return opaque zero `(0,0,0,1)` for images without an alpha channel.

[`MTLSamplerAddressModeClampToBorderColor`](/documentation/Metal/MTLSamplerAddressMode/clampToBorderColor)

An address mode that returns the sampler’s border color.

## Relationships

### Conforms To

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

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

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

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

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

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

---

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)