fixed a potential epsilon issue

metadata
Wenzel Jakob 2010-11-02 01:16:56 +01:00
parent 7760edbe8b
commit 5869939692
1 changed files with 2 additions and 2 deletions

View File

@ -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;