Ray Tracing, Bounding Volume Hierarchy, Bvh, Axis Aligned, Tetrahedron Octahedron.
to not overcomplicate things. Second, it is important that we save a float4 origin and direction within a ray instead of float3 (if that is not already the case). Then, after the last transform operation on the ray (e.g., after it’s transformed into local space of an object), we have to compute the