Picking with framebuffer objects

To find what is under the mouse, draw the scene again off-screen with every object (or face) in a colour that identifies it, and read back the one pixel under the mouse. This page combines pickCube to pickCube6, and on every pick runs each way of doing it side by side, checked against a ray cast on the CPU.

Oops ... your browser doesn't support the HTML5 canvas element
Click to pick · drag to orbit

MethodPixel readResultAgrees with the ray castms
Example
How to pick
View

What the samples do, and what this page changes