<!--
{
  "availability" : [
    "iOS: 11.0.0 -",
    "iPadOS: 11.0.0 -",
    "macCatalyst: 14.0.0 -",
    "macOS: 11.0.0 -",
    "tvOS: 14.5.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Metal",
  "identifier" : "/documentation/Metal/MTLRenderCommandEncoder/setTileSamplerStates:withRange:",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Metal"
    ],
    "preciseIdentifier" : "c:objc(pl)MTLRenderCommandEncoder(im)setTileSamplerStates:withRange:"
  },
  "title" : "setTileSamplerStates:withRange:"
}
-->

# setTileSamplerStates:withRange:

Assigns multiple sampler states to a range of entries in the tile shader argument table.

```
- (void) setTileSamplerStates:(id<MTLSamplerState> const[]) samplers withRange:(NSRange) range;
```

## Parameters

`samplers`

A pointer to a C array of [`MTLSamplerState`](/documentation/Metal/MTLSamplerState) instances the command assigns to entries in the tile shader argument table for sampler states.

`range`

A span of integers that represent the entries in the tile shader argument table for sampler states. Each entry stores a record of the corresponding element in `samplers`.

## Discussion

By default, the sampler state at each index is `nil`.

> Note:
> The Swift version of this method is ``doc://com.apple.metal/documentation/Metal/MTLRenderCommandEncoder/setTileSamplerStates(_:range:)``.

---

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)