<!--
{
  "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/MTLRenderCommandEncoder/setFragmentTextures:withRange:",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Metal"
    ],
    "preciseIdentifier" : "c:objc(pl)MTLRenderCommandEncoder(im)setFragmentTextures:withRange:"
  },
  "title" : "setFragmentTextures:withRange:"
}
-->

# setFragmentTextures:withRange:

Assigns multiple textures to a range of entries in the fragment shader argument table.

```
- (void) setFragmentTextures:(id<MTLTexture> const[]) textures withRange:(NSRange) range;
```

## Parameters

`textures`

A pointer to a C array of [`MTLTexture`](/documentation/Metal/MTLTexture) instances the command assigns to entries in the fragment shader argument table for textures.

`range`

A span of integers that represent the entries in the fragment shader argument table for textures. Each entry stores a record of the corresponding element in `textures`.

## Discussion

By default, the texture at each index is `nil`.

> Note:
> The Swift version of this method is ``doc://com.apple.metal/documentation/Metal/MTLRenderCommandEncoder/setFragmentTextures(_: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)