---
title: "setVisibleFunctionTables(_:range:)"
framework: metal
role: symbol
role_heading: Instance Method
path: "metal/mtlargumentencoder/setvisiblefunctiontables(_:range:)"
---

# setVisibleFunctionTables(_:range:)

Encodes references to an array of ray-tracing intersection-function tables into the argument buffer.

## Declaration

```swift
func setVisibleFunctionTables(_ visibleFunctionTables: [(any MTLVisibleFunctionTable)?], range: Range<Int>)
```

## Parameters

- `visibleFunctionTables`: An array of visible-function tables the method encodes.
- `range`: A range of indices within the argument buffer for each element in visibleFunctionTables. The values correspond to either the index IDs of declarations in Metal Shading Language (MSL) or the doc://com.apple.metal/documentation/Metal/MTLArgumentDescriptor/index property of doc://com.apple.metal/documentation/Metal/MTLArgumentDescriptor instances.

## See Also

### Encoding function tables

- [setVisibleFunctionTable(_:index:)](metal/mtlargumentencoder/setvisiblefunctiontable(_:index:).md)
- [setIntersectionFunctionTable(_:index:)](metal/mtlargumentencoder/setintersectionfunctiontable(_:index:).md)
- [setIntersectionFunctionTables(_:range:)](metal/mtlargumentencoder/setintersectionfunctiontables(_:range:).md)
