Does Optix 7.X still support to specify accelerating data structure?

Hi, I’m implementing an algorithm that requires counting the number of intersections. I thought I can do this by counting numbers in anyhit program. However, I found out the same triangle could be hit multiple times in certain cases. After some search, I found a post that said when using SBVH/TRBVH, a primitive can be split that cause the problem. A workaround solution will be launching a new trace from the last closest hit point, which may reduce the performance. My question is can I specify which BVH variant to use when building AS in Optix 7.x?

The acceleration structure builder is selected automatically in OptiX 7 and will use splitting by default, but there is an OptixGeometryFlags named OPTIX_GEOMETRY_FLAG_REQUIRE_SINGLE_ANYHIT_CALL with which you can disable that exactly for such algorithms.

Related forum topic with links to the documentation and other cases.
Note the comment inside the OptiX Programming Guide saying that this may affect traversal performance.
https://forums.developer.nvidia.com/t/anyhit-program-as-shadow-ray-with-optix-7-2/181312/6

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.