MTLIntersectionFunctionTable
A table of intersection functions that Metal calls to perform ray-tracing intersection tests.
Declaration
protocol MTLIntersectionFunctionTable : MTLResourceOverview
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:
- Compute pipeline
- Render pipeline
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
Specifying arguments for intersection functions
setBuffer(_:offset:index:)setBuffers(_:offsets:range:)setVisibleFunctionTable(_:bufferIndex:)setVisibleFunctionTables(_:bufferRange:)
Specifying opaque triangle intersection testing
setOpaqueTriangleIntersectionFunction(signature:index:)setOpaqueTriangleIntersectionFunction(signature:range:)