I’m having a little problem performing picking (I have to use picking, because I need to select AA lines and points with a per pixel accuracy, and any other way could be hardest, much more) over smoothed points. They are placed very very close to a plane (something like a a decal) and the picking way, always put the points farther than the plane, so the plane is selected first (it appears first in the selection buffer), no matter if I separate the points from the plane. I want to know a thing, so I hope anybody could confirm my suspects: All point’s fragments shares the same depth? if this were the case, it could explain why doesn’t matter the place in the point where I click, because it’s center could be still farther than the plane. If this were the case, I suspect that I’ll have to pass to the ‘drawing colors in the backbuffer and read them’ picking technique.
Maybe this related discussion can help :
The order in selection buffer is the drawing order.
Thanks for your reply
I was unable to solve the problem using points. The problem was that, for a proper selection, the smoothed point must not be ‘clipped’ by the plane. If it was clipped, the picking rarely happens. To avoid that I have to separate too much the points from the plane ( or perform the selection much closer to the plane than I wanted ), so I’ve changed the points (actually, point sprites) to quads and perform by myself their constant screen space size calculations.
After this problem with point sprites and another one related on texturing them and having an exact match “texel-to-screen pixel relation” I decided only use them for particles, and not for fonts neither selectable widgets in a 2D/3D world.