Closest hit and visibility

I’ve created a source and a sink that are not necessarily in the same position. I’ve successfully cast a ray from the source to a part of the geometry such that the __closesthit__ function is called. Since the sink doesn’t have any geometry, does it make sense to cast a ray from the sink to the hit point and test if it’s the same, or is there a better way?

Thank you.

That sounds like a transmitter/receiver setup.

Because you cannot hit something which has no geometry inside the scene, such connections need to be constructed explicitly.
Think of the sink as light and then it’s like a direct lighting implementation problem.

This has been discussed in some other threads before.
Please read this thread and follow the links at the bottom of this post:
https://forums.developer.nvidia.com/t/optix-basic-visualization-problem/285734/2

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