Friday, February 08, 2008

Subtlity of Float Inexactness in Ray Tracing


When a ray R hit a target T at point p, we may create new rays of reflection or refraction R1, R2 starting from point p, and calculate the intersection points for these R1, R2. However, due to the inexactness of floating point, the first intersecting point we obtain will be p itself with tiny perturbations. This point of course should be discarded away, otherwise some rays won't return correct value, the scene would be like this (the blue ball has may inconsistent spots on it)







The right scene should be like this:

No comments: