Currently, I am working on implementing a basic GPU picker in three.js by using the MeshDepthMaterial. I have successfully extracted the color value by referring to this example code snippet: https://github.com/mrdoob/three.js/blob/master/examples/webgl_interactive_cubes_gpu.html
To reconstruct the depth, I have translated the unpackRGBAToDepth function from this location into JavaScript: https://github.com/mrdoob/three.js/blob/acdda10d5896aa10abdf33e971951dbf7bd8f074/src/renderers/shaders/ShaderChunk/packing.glsl
The issue arises when the retrieved value appears as a float ranging from 0.0 to 255.0 instead of the expected range of 0.0 to 1.0 or the actual depth value. My inquiry is to understand how I can utilize this value, and whether it can be converted to represent the real depth accurately. If so, what would be the process to achieve this conversion?