A test for Ray-box (AABB) intersection algorithm. The yellow, green and red colors indicates the pixels where ray and the bounding box intersected. Sliders to change the bounding box and version of testing. 1 original 2 improved 3 optimized (effective for multi-boxes testing) Sliders x1, x2, y1, y2, z1, z2 to change the box boundary. space bar to reset e key to end.
Ray Box Intersection Test is used for accelerating ray tracing (Bounding sphere can also be used). Recommend to use TurboWarp https://turbowarp.org/