I’m utilizing intersection_query
from Steel’s raytracing apis to intersect an acceleration construction of axis aligned bounding packing containers. In my shader, I’m looking for the gap the place the intersection takes place. Instance code:
ray r = ...;
primitive_acceleration_structure accelerationStructure = ...;
intersection_query<> i(r, accelerationStructure);
whereas (i.subsequent()) {
float distance = // ???
...
}
Nonetheless I am unable to discover how you can get this distance from the intersection_query
. For triangle knowledge there’s get_candidate_triangle_distance()
, however there isn’t a get_candidate_primitive_distance()
.
Is there a quick builtin technique to get this distance or do I’ve to implement this calculation myself?