Contents

intersectionFunctionTableOffset

An offset for determining which function in the intersection function table Metal needs to call when testing a ray against the instance.

Declaration

var intersectionFunctionTableOffset: UInt32

Discussion

By default, after Metal finds an intersection between a ray and a primitive, it runs your specified intersection function to determine whether the ray actually hit the primitive. To determine which function in the intersection table to call, Metal adds this property to the value in the instance’s intersectionFunctionTableOffset, and looks up the entry at that index.

See Also

Customizing intersection and hit tests for the instance