Ray Tracing, Bounding Volume Hierarchy, Bvh, Axis Aligned, Tetrahedron Octahedron.
Let’s see how we could do that. The state-of-the-art Ray-AABB algorithm which is also used by NVIDIA OptiX and Intel Embree is described by Majercik et al. I’ve also written a blog post about it. For convenience, here is the listing again: Listing 1 from Majercik et al. — State-of-the-art Ray-AABB