From 3f6fd615a96a3cf347557f6f82b5daee767039a0 Mon Sep 17 00:00:00 2001 From: David Doan Date: Tue, 12 Dec 2023 22:29:39 -0500 Subject: isHit --- src/accelerate/bvh.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/accelerate/bvh.cpp') diff --git a/src/accelerate/bvh.cpp b/src/accelerate/bvh.cpp index 19f9390..2949cbe 100644 --- a/src/accelerate/bvh.cpp +++ b/src/accelerate/bvh.cpp @@ -114,8 +114,8 @@ float RayTracer::traverseBVH( for (const auto &shape: current.shapes) { glm::vec4 pObject = shape.shape.inverseCTM * p; glm::vec4 dObject = glm::normalize(shape.shape.inverseCTM * d); - - glm::vec4 intersection = findIntersection(pObject, dObject, shape.shape); + bool isHit = false; + glm::vec4 intersection = findIntersection(pObject, dObject, shape.shape, isHit); if (intersection.w == 0.f) { continue; } @@ -148,4 +148,4 @@ float RayTracer::traverseBVH( } return minT; -} \ No newline at end of file +} -- cgit v1.2.3-70-g09d2