aboutsummaryrefslogtreecommitdiff
path: root/src/raytracer/raytracer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/raytracer/raytracer.cpp')
-rw-r--r--src/raytracer/raytracer.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/raytracer/raytracer.cpp b/src/raytracer/raytracer.cpp
index 3db0faa..65f898d 100644
--- a/src/raytracer/raytracer.cpp
+++ b/src/raytracer/raytracer.cpp
@@ -99,7 +99,7 @@ glm::vec4 RayTracer::getPixelFromRay(
continue;
}
- auto newIntersectionWorld = shape.ctm * newIntersectionObj;
+ auto newIntersectionWorld = Vec4Ops::transformPoint4(newIntersectionObj,shape.ctm,shape.translation4d);
float newDist = glm::distance(newIntersectionWorld, pWorld);
if (
newDist < minDist // closer intersection