<!--
{
  "availability" : [
    "iOS: 8.0.0 -",
    "iPadOS: 8.0.0 -",
    "macCatalyst: -",
    "macOS: 10.11.0 -",
    "tvOS: 8.0.0 -",
    "visionOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "Metal",
  "identifier" : "/documentation/Metal/MTLComputeCommandEncoder/setTextures(_:range:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Metal"
    ],
    "preciseIdentifier" : "s:So24MTLComputeCommandEncoderP5MetalE11setTextures_5rangeySaySo10MTLTexture_pSgG_SnySiGtF"
  },
  "title" : "setTextures(_:range:)"
}
-->

# setTextures(_:range:)

Binds multiple textures to the texture argument table, allowing compute functions to access their data on the GPU.

```
func setTextures(_ textures: [(any MTLTexture)?], range: Range<Int>)
```

## Parameters

`textures`

A list of [`MTLTexture`](/documentation/Metal/MTLTexture) instances to bind to the texture argument table.

`range`

The texture table indices to bind each of the `textures` to, in the order they appear.

## Discussion> Important:
> This method requires that the number of instances in `textures` be the same as the length of `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)