<!--
{
  "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/MTLSamplerDescriptor",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "Metal"
    ],
    "preciseIdentifier" : "c:objc(cs)MTLSamplerDescriptor"
  },
  "title" : "MTLSamplerDescriptor"
}
-->

# MTLSamplerDescriptor

An object that you use to configure a texture sampler.

```
class MTLSamplerDescriptor
```

## Overview

To make a sampler, create and configure an [`MTLSamplerDescriptor`](/documentation/Metal/MTLSamplerDescriptor) instance and
then call an [`MTLDevice`](/documentation/Metal/MTLDevice) instance’s [`makeSamplerState(descriptor:)`](/documentation/Metal/MTLDevice/makeSamplerState(descriptor:)) method.
After you create the sampler, you can release the descriptor or reconfigure its properties to create other samplers.

## Topics

### Declaring the coordinate space

[`normalizedCoordinates`](/documentation/Metal/MTLSamplerDescriptor/normalizedCoordinates)

A Boolean value that indicates whether texture coordinates are normalized to the range `[0.0, 1.0]`.

### Declaring addressing modes

[`rAddressMode`](/documentation/Metal/MTLSamplerDescriptor/rAddressMode)

The address mode for the texture depth (r) coordinate.

[`sAddressMode`](/documentation/Metal/MTLSamplerDescriptor/sAddressMode)

The address mode for the texture width (s) coordinate.

[`tAddressMode`](/documentation/Metal/MTLSamplerDescriptor/tAddressMode)

The address mode for the texture height (t) coordinate.

[`borderColor`](/documentation/Metal/MTLSamplerDescriptor/borderColor)

The border color for clamped texture values.

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

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

[`MTLSamplerBorderColor`](/documentation/Metal/MTLSamplerBorderColor)

Values that determine the border color for clamped texture values when the sampler address mode is [`MTLSamplerAddressMode.clampToBorderColor`](/documentation/Metal/MTLSamplerAddressMode/clampToBorderColor).

### Declaring filter modes

[`minFilter`](/documentation/Metal/MTLSamplerDescriptor/minFilter)

The filtering option for combining pixels within one mipmap level when the sample footprint is larger than a pixel (minification).

[`magFilter`](/documentation/Metal/MTLSamplerDescriptor/magFilter)

The filtering operation for combining pixels within one mipmap level when the sample footprint is smaller than a pixel (magnification).

[`mipFilter`](/documentation/Metal/MTLSamplerDescriptor/mipFilter)

The filtering option for combining pixels between two mipmap levels.

[`lodMinClamp`](/documentation/Metal/MTLSamplerDescriptor/lodMinClamp)

The minimum level of detail (LOD) to use when sampling from a texture.

[`lodMaxClamp`](/documentation/Metal/MTLSamplerDescriptor/lodMaxClamp)

The maximum level of detail (LOD) to use when sampling from a texture.

[`lodAverage`](/documentation/Metal/MTLSamplerDescriptor/lodAverage)

A Boolean value that specifies whether the GPU can use an average level of detail (LOD) when sampling from a texture.

[`maxAnisotropy`](/documentation/Metal/MTLSamplerDescriptor/maxAnisotropy)

The number of samples that can be taken to improve the quality of sample footprints that are anisotropic.

[`MTLSamplerMinMagFilter`](/documentation/Metal/MTLSamplerMinMagFilter)

Filtering options for determining which pixel value is returned within a mipmap level.

[`MTLSamplerMipFilter`](/documentation/Metal/MTLSamplerMipFilter)

Filtering options for determining what pixel value is returned with multiple mipmap levels.

### Declaring the depth comparison mode

[`compareFunction`](/documentation/Metal/MTLSamplerDescriptor/compareFunction)

The sampler comparison function used when performing a sample compare operation on a depth texture.

[`MTLCompareFunction`](/documentation/Metal/MTLCompareFunction)

Options used to specify how a sample compare operation should be performed on a depth texture.

### Declaring whether the sampler can be used in argument buffers

[`supportArgumentBuffers`](/documentation/Metal/MTLSamplerDescriptor/supportArgumentBuffers)

A Boolean value that indicates whether you can reference a sampler, that you make
with this descriptor, by its resource ID from an argument buffer.

### Identifying the sampler

[`label`](/documentation/Metal/MTLSamplerDescriptor/label)

A string that identifies the sampler.



---

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)