---
title: "setIntersectionFunctionTable(_:bufferIndex:)"
framework: metal
role: symbol
role_heading: Instance Method
path: "metal/mtlcomputecommandencoder/setintersectionfunctiontable(_:bufferindex:)"
---

# setIntersectionFunctionTable(_:bufferIndex:)

Binds an intersection function table to the buffer argument table, making it callable in your Metal shaders.

## Declaration

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

## Parameters

- `intersectionFunctionTable`: The doc://com.apple.metal/documentation/Metal/MTLIntersectionFunctionTable to bind.
- `bufferIndex`: The index in the buffer argument table the intersection function table binds to.

## See Also

### Binding arguments for acceleration structures

- [setAccelerationStructure(_:bufferIndex:)](metal/mtlcomputecommandencoder/setaccelerationstructure(_:bufferindex:).md)
