fixed a potential epsilon issue
parent
7760edbe8b
commit
5869939692
|
@ -113,8 +113,8 @@ bool KDTree::rayIntersect(const Ray &ray, Intersection &its) const {
|
|||
/* Use an adaptive ray epsilon */
|
||||
Float rayMinT = ray.mint;
|
||||
if (rayMinT == Epsilon)
|
||||
rayMinT *= std::max(std::max(std::abs(ray.o.x),
|
||||
std::abs(ray.o.y)), std::abs(ray.o.z));
|
||||
rayMinT *= std::max(std::max(std::max(std::abs(ray.o.x),
|
||||
std::abs(ray.o.y)), std::abs(ray.o.z)), Epsilon);
|
||||
|
||||
if (rayMinT > mint) mint = rayMinT;
|
||||
if (ray.maxt < maxt) maxt = ray.maxt;
|
||||
|
|
Loading…
Reference in New Issue