aboutsummaryrefslogtreecommitdiff
path: root/src/accelerate/bvh.cpp
diff options
context:
space:
mode:
authorDavid Doan <daviddoan@Davids-MacBook-Pro-100.local>2023-12-12 22:29:39 -0500
committerDavid Doan <daviddoan@Davids-MacBook-Pro-100.local>2023-12-12 22:29:39 -0500
commit3f6fd615a96a3cf347557f6f82b5daee767039a0 (patch)
treef8b23b4ca16669c4cd4b3c7348e07e674cc34f6e /src/accelerate/bvh.cpp
parent018c2504879f3a585a3f6f0921c9aba22f6a9b76 (diff)
isHit
Diffstat (limited to 'src/accelerate/bvh.cpp')
-rw-r--r--src/accelerate/bvh.cpp6
1 files changed, 3 insertions, 3 deletions
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
+}