Fixes box collision condition to fix mirror effect

This commit is contained in:
Maximilian Giller 2022-11-17 16:55:18 +01:00
parent 4458492a42
commit 53966ad869

View file

@ -52,7 +52,7 @@ bool Box::intersect(Ray &ray) const
float t = tIn;
// Test whether this is the foremost primitive in front of the camera
if (t >= ray.length)
if (t >= ray.length || t < EPSILON)
{
return false;
}