Jump to content

  • Log In with Google      Sign In   
  • Create Account


#ActualGarFieldo

Posted 11 February 2013 - 03:43 PM

I have had a similar problem with my raytracer. When checking for intersections, I used to compare the factor for the direction with zero to determine whether the object is in front of the view plane:

...
t1 = object.intersect(ray);
if(t1 > 0 && ...)
...

It fixed once I compared to a value near zero, e.g. 0.000001 instead. I can only assume that some sort of floating point operation inaccuracy is the reason for the artifacts.


#2GarFieldo

Posted 11 February 2013 - 02:33 PM

I have had a similar problem with my raytracer. When checking for intersections, I used to compare the factor for the direction with zero to determine whether the object is in front of the view plane. It fixed once I compared to a value near zero, e.g. 0.000001 instead. I can only assume that some sort of floating point operation inaccuracy is the reason for the artifacts.


#1GarFieldo

Posted 11 February 2013 - 02:33 PM

I hava had a similar problem with my raytracer. When checking for intersections, I used to compare the factor for the direction with zero to determine whether the object is in front of the view plane. It fixed once I compared to a value near zero, e.g. 0.000001 instead. I can only assume that some sort of floating point operation inaccuracy is the reason for the artifacts.


PARTNERS