How to get multiple depth values of the mesh on the same pixel of the scene?

Hi, I want to achieve multiple depth values of the mesh on the same pixel of the scene.

Currently, only the depth value of the rendered element can be computed. But there should be landscape elements behind the rendered one, which also have depth values.

Is there any way to collect them?

I appreciate your help and suggestions.

Best,

Eric.

Hi @EricLee,

I don’t believe we have access to per-pass depth values in the public API at the moment. This may be technically possible if you modify the source code. You’d have to sample the czm_globeDepthTexture on the GPU and use gl.ReadPixels to extract the information back to the CPU.

Hope this helps,
Sam.

OK. Many thanks. I will test it.