Re: depth values in picking

Posted by gouessej on
URL: https://forum.jogamp.org/depth-values-in-picking-tp4030347p4030349.html

Hi

Depth values (which are in the range [0,1]) are multiplied by 2^32 - 1, before being placed in the hit record.
http://www.manpagez.com/man/3/glSelectBuffer/

I assume you use the code I fixed several years ago:
http://forum.jogamp.org/bad-use-of-depths-in-Picking-java-td1446213.html

The distribution is not linear, that's why you don't get exactly 1 in the middle.
Julien Gouesse | Personal blog | Website