---
title: MTLSamplerDescriptor
framework: metal
role: symbol
role_heading: Class
path: metal/mtlsamplerdescriptor
---

# MTLSamplerDescriptor

An object that you use to configure a texture sampler.

## Declaration

```swift
class MTLSamplerDescriptor
```

## Mentioned in

Adding mipmap filtering to samplers Improving CPU performance by using argument buffers Restricting access to specific mipmaps

## Overview

Overview To make a sampler, create and configure an MTLSamplerDescriptor instance and then call an MTLDevice instance’s 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](metal/mtlsamplerdescriptor/normalizedcoordinates.md)

### Declaring addressing modes

- [rAddressMode](metal/mtlsamplerdescriptor/raddressmode.md)
- [sAddressMode](metal/mtlsamplerdescriptor/saddressmode.md)
- [tAddressMode](metal/mtlsamplerdescriptor/taddressmode.md)
- [borderColor](metal/mtlsamplerdescriptor/bordercolor.md)
- [MTLSamplerAddressMode](metal/mtlsampleraddressmode.md)
- [MTLSamplerBorderColor](metal/mtlsamplerbordercolor.md)

### Declaring filter modes

- [minFilter](metal/mtlsamplerdescriptor/minfilter.md)
- [magFilter](metal/mtlsamplerdescriptor/magfilter.md)
- [mipFilter](metal/mtlsamplerdescriptor/mipfilter.md)
- [lodMinClamp](metal/mtlsamplerdescriptor/lodminclamp.md)
- [lodMaxClamp](metal/mtlsamplerdescriptor/lodmaxclamp.md)
- [lodAverage](metal/mtlsamplerdescriptor/lodaverage.md)
- [maxAnisotropy](metal/mtlsamplerdescriptor/maxanisotropy.md)
- [MTLSamplerMinMagFilter](metal/mtlsamplerminmagfilter.md)
- [MTLSamplerMipFilter](metal/mtlsamplermipfilter.md)

### Declaring the depth comparison mode

- [compareFunction](metal/mtlsamplerdescriptor/comparefunction.md)
- [MTLCompareFunction](metal/mtlcomparefunction.md)

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

- [supportArgumentBuffers](metal/mtlsamplerdescriptor/supportargumentbuffers.md)

### Identifying the sampler

- [label](metal/mtlsamplerdescriptor/label.md)

### Instance Properties

- [lodBias](metal/mtlsamplerdescriptor/lodbias.md)
- [reductionMode](metal/mtlsamplerdescriptor/reductionmode.md)

## Relationships

### Inherits From

- [NSObject](objectivec/nsobject-swift.class.md)

### Conforms To

- [CVarArg](swift/cvararg.md)
- [CustomDebugStringConvertible](swift/customdebugstringconvertible.md)
- [CustomStringConvertible](swift/customstringconvertible.md)
- [Equatable](swift/equatable.md)
- [Hashable](swift/hashable.md)
- [NSCopying](foundation/nscopying.md)
- [NSObjectProtocol](objectivec/nsobjectprotocol.md)

## See Also

### Texture samplers

- [Creating and sampling textures](metal/creating-and-sampling-textures.md)
- [MTLSamplerState](metal/mtlsamplerstate.md)
- [MTLSamplePosition](metal/mtlsampleposition.md)
- [MTLSamplerReductionMode](metal/mtlsamplerreductionmode.md)
