Retrieving alpha from framebuffer

Ah, great, thank you!

Thank you for the explanations :slight_smile: .

In my project, Panda3D Studio (shameless plug :stuck_out_tongue: ), you can manipulate model objects (and their subobjects), but to do so, you need to select them first. Instead of having to choose an object’s name from a list, it’s obviously more intuitive and user-friendly to be able to just click on the object. Collision detection could be used for this, but is far too slow when many objects need to be checked. Instead, I prefer a technique called “picking”; basically, each object is rendered a second time, with a unique color. This color can then be retrieved from the framebuffer to identify the object the mouse is over. Normally, this could also be slow, depending on the window size, but I use a trick: I create a special “picking camera” to render only the exact pixel that the mouse is currently over, so it’s quite fast.