Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Data/BoundingVolumeHierarchy] Querying a leaf checks the triangle first
- It allows avoiding doing useless operations further, since we know it can't hit anything - If the node is a leaf, the triangle is directly tested instead of first testing the AABB - Performance-wise, it presumably is either the same or marginally more efficient, as there's supposedly a high probability of hitting the triangle when reaching a leaf - The ray-AABB check can fill the hit structure with irrelevant data - These changes allow for a speedup of ~10%
- Loading branch information