I would like to get the intersected objects and depth from specific pixel.
Currently, I can get only the first intersection by using depth map but I want also the occluded objects (behind the first object), i.e list for specific pixel with all the intersections and depth.
For that, I thought to use ray_cast for each object and get the intersection but I need to get ray from pixel first.
I have 2 questions:
- How can I get ray direction from specific pixel?
- The ray_cast function is for specific object, is there function that finds intersection it for all the objects in the scene efficiently?