I was looking for a way to display mouse-over context information in a 3D scene, and the solution I came up with is to encode the ID of each object into colors, and render that to an off-screen framebuffer. Then, I can simply look up the pixel at the current cursor coordinates and get the ID!
It feels like a cheeky hack, but honestly I can't think of any other practical way for this - does anyone know how games and such do this?
:blobcatverified2:
in reply to Draemmli • • •:blobcatverified2:
in reply to :blobcatverified2: • • •webglfundamentals.org/webgl/le…
WebGL Picking
WebglFundamentals