---
title: MTLIntersectionFunctionTable
framework: metal
role: symbol
role_heading: Protocol
path: metal/mtlintersectionfunctiontable
---

# MTLIntersectionFunctionTable

A table of intersection functions that Metal calls to perform ray-tracing intersection tests.

## Declaration

```swift
protocol MTLIntersectionFunctionTable : MTLResource
```

## Overview

Overview Don’t implement this protocol yourself. Instead create an MTLIntersectionFunctionTableDescriptor instance and configure its properties. Then call the appropriate method on the pipeline state that you want to use this table with: If you use the same ray-tracing functions with more than one pipeline, make a separate table for each. Use the methods on this instance to set the table entries to point at the intersection functions, and to provide buffers as arguments for those functions. For more information about intersection functions, see Metal Shading Language Specification.

## Topics

### Setting a table entry

- [setFunction(_:index:)](metal/mtlintersectionfunctiontable/setfunction(_:index:).md)
- [setFunctions(_:range:)](metal/mtlintersectionfunctiontable/setfunctions(_:range:).md)

### Specifying arguments for intersection functions

- [setBuffer(_:offset:index:)](metal/mtlintersectionfunctiontable/setbuffer(_:offset:index:).md)
- [setBuffers(_:offsets:range:)](metal/mtlintersectionfunctiontable/setbuffers(_:offsets:range:).md)
- [setVisibleFunctionTable(_:bufferIndex:)](metal/mtlintersectionfunctiontable/setvisiblefunctiontable(_:bufferindex:).md)
- [setVisibleFunctionTables(_:bufferRange:)](metal/mtlintersectionfunctiontable/setvisiblefunctiontables(_:bufferrange:).md)

### Specifying opaque triangle intersection testing

- [setOpaqueTriangleIntersectionFunction(signature:index:)](metal/mtlintersectionfunctiontable/setopaquetriangleintersectionfunction(signature:index:).md)
- [setOpaqueTriangleIntersectionFunction(signature:range:)](metal/mtlintersectionfunctiontable/setopaquetriangleintersectionfunction(signature:range:).md)

### Instance Properties

- [gpuResourceID](metal/mtlintersectionfunctiontable/gpuresourceid.md)

### Instance Methods

- [setOpaqueCurveIntersectionFunction(signature:index:)](metal/mtlintersectionfunctiontable/setopaquecurveintersectionfunction(signature:index:).md)
- [setOpaqueCurveIntersectionFunction(signature:range:)](metal/mtlintersectionfunctiontable/setopaquecurveintersectionfunction(signature:range:).md)

## Relationships

### Inherits From

- [MTLAllocation](metal/mtlallocation.md)
- [MTLResource](metal/mtlresource.md)
- [NSObjectProtocol](objectivec/nsobjectprotocol.md)

## See Also

### Intersection function tables

- [MTLIntersectionFunctionTableDescriptor](metal/mtlintersectionfunctiontabledescriptor.md)
- [MTLIntersectionFunctionDescriptor](metal/mtlintersectionfunctiondescriptor.md)
- [MTLIntersectionFunctionSignature](metal/mtlintersectionfunctionsignature.md)
- [MTLIntersectionFunctionBufferArguments](metal/mtlintersectionfunctionbufferarguments.md)
