Choosing the Nearest Positive Intersection

A ray can intersect more than one surface. A visibility query can select the smallest valid positive parameter under the ray's interval convention.

Source
Anbloq
Language
English
Created
Updated
Chapters
2
Reading time
1 min
In this article2 chapters
  1. Trace three candidates
  2. Document the starting boundary

Trace three candidates

Hit parameters minus one, two, and five give a nearest forward hit at two when positive values are allowed. The negative point lies behind the ray origin. See the ray equation.

Document the starting boundary

Some queries require a strictly positive minimum interval. Test a hit exactly at the boundary and one beyond it. Inclusive and exclusive comparisons govern that rule.[1]

References

  1. Matt Pharr, Wenzel Jakob and Greg Humphreys, Physically Based Rendering ↩