Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Entities that can't be picked, don't write to the texture, entities that can be picked, write to the texture their id. Whatever is closer to the camera will be the id that stays there (same as a color pixel, but instead of the object color you can think object id). So you are limited at one ID per pixel, but for me that works.




Right, it's the same z-buffer problem of deciding what pixel color is visible, with a non-blending buffer update mode.

To be totally coherent, you have to draw the entity ID in the same order you would draw the visible color, in cases where entities could "tie" at the same depth.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: