---
title: Inspecting sampler states
framework: xcode
role: article
role_heading: Article
path: xcode/inspecting-sampler-states
---

# Inspecting sampler states

Verify your sampler state configurations by examining their properties.

## Overview

Overview The Metal debugger allows you to inspect a sampler state with the Sampler State viewer. After opening a sampler state, you can view its associated properties and preview the sampling behavior. For more information, see Inspecting the bound resources for a command or Analyzing memory usage. Navigate your sampler state The Sampler State viewer shows the properties of your sampler state on the left (as configured by MTLSamplerDescriptor) and a preview on the right. The preview illustrates how pixels in a texture appear when using your sampler state.

The square region in the center of the preview corresponds to UV coordinates within the range of 0.0 to 1.0.

You can use the preview to quickly verify the configuration for your sampler state. For example, if you want a texture to mirror, but it’s drawing a constant value instead, you can check the sampler state. In the screenshot below, the sampler state is configured to clamp to a border color that’s opaque black, rather than using mirror repeat as the address mode:

Try various combinations The properties you configure when creating a sampler state determine how a texture looks when sampling it. The properties related to filtering control how pixels combine when the sample footprint is either larger or smaller than a pixel, or when it’s between mipmap levels. The address mode determines the texture coordinate at each pixel when a read falls outside the bounds of a texture. You can try using different combinations of filtering and addressing modes until you achieve your desired look.  |   |   |   |   |   |   |   |   |   |   |   |   |   |   |   |   |

## See Also

### Metal resource inspection

- [Inspecting acceleration structures](xcode/inspecting-acceleration-structures.md)
- [Inspecting buffers](xcode/inspecting-buffers.md)
- [Inspecting pipeline states](xcode/inspecting-pipeline-states.md)
- [Inspecting shaders](xcode/inspecting-shaders.md)
- [Inspecting textures](xcode/inspecting-textures.md)
