I’m seeing the same position on the same triangle occasionally get hit multiple times for a single ray in an any-hit program. What could be causing this? I’m running optixIgnoreIntersection every time in the any-hit program, but I still wouldn’t expect it to hit the same triangle twice and this is causing problems.
Here’s some print output from the any-hit program for an example ray showing duplicate hits on the same triangle:
Launch index 0, origin 0.265714 -0.020000 -0.734286, back face hit 1, hit 0.265714 -0.020000 -0.051340, tmax 0.682946, instance index 0, gas index 42, primitive index 3
Launch index 0, origin 0.265714 -0.020000 -0.734286, back face hit 0, hit 0.265714 -0.020000 -0.463696, tmax 0.270589, instance index 0, gas index 42, primitive index 1
Launch index 0, origin 0.265714 -0.020000 -0.734286, back face hit 1, hit 0.265714 -0.020000 -0.051340, tmax 0.682946, instance index 0, gas index 42, primitive index 3
Launch index 0, origin 0.265714 -0.020000 -0.734286, back face hit 0, hit 0.265714 -0.020000 0.765561, tmax 1.499846, instance index 0, gas index 2, primitive index 0
Launch index 0, origin 0.265714 -0.020000 -0.734286, back face hit 1, hit 0.265714 -0.020000 1.164358, tmax 1.898644, instance index 0, gas index 2, primitive index 2