What is the most efficient way of capturing the XYZ world coordinates of an entire scene as seen from the camera’s viewpoint? I’ve found threads regarding picking a few points from the scene using a mouse, but have not been able to find anything regarding capturing the entire scene.
One way to do this is to use an FBO with two color attachments, one to store the regular color output and a second (with a floating point format) to store world xyz.
You can also reconstruct world xyz from the depth buffer and knowledge of the view & projection matrices.
As for most efficient, that depends on what your measure of efficiency is: amount of programmer work, runtime performance, memory consumption, etc.
Thanks. You make a good point regarding efficiency, I was anything but precise. I am most concerned about runtime performance.