Gpu Picker - Depth Buffer Issues

Hey all,

Working on a gpu picker in three js and noticing that b/c we have a large clipping plane, on zoom out, readRenderTargetPixels is returning the wrong color. Its picking a mesh that’s behind another mesh. I looked into the logarithmic depth buffer & that works but also is what I’d call too strong → line geometry is sometimes hard to pick up using that.

If I render the gpu picker visually, I’m not seeing any z-fighting going on → its just readRenderTargetPixels having the issues.

Anyone have any ideas on this?

Humm, that sounds interesting. ReadRenderTargetPixels is quite sensitive to scale sometimes. How big is the clipping plane? Please consider sharing a working demo on fiddle or similar