From c4f86eb5a6f2cdcc7906289153f77a676a3c52d8 Mon Sep 17 00:00:00 2001 From: Maik Schulze Date: Sun, 1 Mar 2020 21:02:25 +0100 Subject: [PATCH 1/2] Fix SphereFilterMultiHitTest by setting inactive mask in order to not filter out the computed hits in the epilog function. Note that RTC_DEVICE_PROPERTY_BACKFACE_CULLING_ENABLED is not fully functional and appears to be always disabled in the intersector. Hence, the test will still fail when compiling with RTC_DEVICE_PROPERTY_BACKFACE_CULLING_ENABLED=OFF (reporting 4 instead of 2 hits) --- tutorials/verify/verify.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tutorials/verify/verify.cpp b/tutorials/verify/verify.cpp index 62dde5b848..18568aad37 100644 --- a/tutorials/verify/verify.cpp +++ b/tutorials/verify/verify.cpp @@ -3962,7 +3962,7 @@ namespace embree rayHit.ray.dir_z = 1; rayHit.ray.tnear = 0; rayHit.ray.tfar = 100000; - rayHit.ray.mask = 0u; + rayHit.ray.mask = -1; rayHit.ray.flags = 0u; rayHit.hit.geomID = RTC_INVALID_GEOMETRY_ID; rayHit.hit.instID[0] = RTC_INVALID_GEOMETRY_ID; From e2541f95eab80bf66f6b81e5eff9a078c30c25a0 Mon Sep 17 00:00:00 2001 From: Maik Schulze Date: Mon, 2 Mar 2020 07:22:39 +0100 Subject: [PATCH 2/2] Fix the failure of the RayMasksTest which has accessed unwritten 'hit' information on rtcOccluded. This information is only written on rtcIntersect. We blindly pass these cases. --- tutorials/verify/verify.cpp | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/tutorials/verify/verify.cpp b/tutorials/verify/verify.cpp index 18568aad37..93b186e00b 100644 --- a/tutorials/verify/verify.cpp +++ b/tutorials/verify/verify.cpp @@ -2560,8 +2560,27 @@ namespace embree RTCRayHit ray3 = makeRay(pos3+Vec3fa(0,10,0),Vec3fa(0,-1,0)); ray3.ray.mask = mask3; RTCRayHit rays[4] = { ray0, ray1, ray2, ray3 }; IntersectWithMode(imode,ivariant,scene,rays,4); - for (size_t j=0; j<4; j++) - passed &= masks[j] & (1<