Reputation: 45
Suppose a sphere was calculated and drawn using OpenGL such as it is done here for example.
I am interested in learning, how one would go about finding the specific vertex that correspond to an arbitrary given pixel on the screen (x,y)?
I've already read about ray casting and the selection buffer, however, since I need to iterate over a large number of pixels (let's say >10k) and find all the corresponding vertices those solutions didn't seem to be suitable for this kind of stuff.
Ideally, I would like to find a way that is both fast and modern in the sense of modern OpenGL.
Is there an "out-of-the-box"-solution for this or do I need to write a shader? In either case, any details you could give would be highly appreciated!
Upvotes: 1
Views: 202
Reputation: 52082
Upvotes: 1