---
title: "setIntersectionFunctionTable(_:index:)"
framework: metal
role: symbol
role_heading: Instance Method
path: "metal/mtlargumentencoder/setintersectionfunctiontable(_:index:)"
---

# setIntersectionFunctionTable(_:index:)

Encodes a reference to a ray-tracing intersection-function table into the argument buffer.

## Declaration

```swift
func setIntersectionFunctionTable(_ intersectionFunctionTable: (any MTLIntersectionFunctionTable)?, index: Int)
```

## Parameters

- `intersectionFunctionTable`: An intersection-function table the method encodes.
- `index`: An index of an intersection-function table within the argument buffer. The value corresponds to either the index ID of a declaration in Metal Shading Language (MSL) or the doc://com.apple.metal/documentation/Metal/MTLArgumentDescriptor/index property of an doc://com.apple.metal/documentation/Metal/MTLArgumentDescriptor instance.

## See Also

### Encoding function tables

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