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

# MTLSamplerState

An instance that defines how a texture should be sampled.

```
protocol MTLSamplerState : NSObjectProtocol, Sendable
```

## Overview

The [`MTLSamplerState`](/documentation/Metal/MTLSamplerState) protocol defines the interface for a lightweight instance used to encode how a shader or compute kernel should sample a texture. To create a sampler state instance:

1. Create an [`MTLSamplerDescriptor`](/documentation/Metal/MTLSamplerDescriptor) instance.
2. Set the desired properties of the sampler descriptor, including filtering options, addressing modes, maximum anisotropy, and level-of-detail parameters.
3. Call the [`makeSamplerState(descriptor:)`](/documentation/Metal/MTLDevice/makeSamplerState(descriptor:)) method of the [`MTLDevice`](/documentation/Metal/MTLDevice) instance.

(Your app does not define a class that implements the [`MTLSamplerState`](/documentation/Metal/MTLSamplerState) protocol.)

You can either release the [`MTLSamplerDescriptor`](/documentation/Metal/MTLSamplerDescriptor) instance or modify its property values and reuse it to create more [`MTLSamplerState`](/documentation/Metal/MTLSamplerState) instances. The descriptor’s properties are only used during instance creation; once created the behavior of a sampler state instance is fixed and cannot be changed.

## Topics

### Identifying the sampler

[`device`](/documentation/Metal/MTLSamplerState/device)

The device object that created the sampler.

[`label`](/documentation/Metal/MTLSamplerState/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)