How to retrieve depth value of pixels from shaders to JavaScript context

We’ve tried using edge detection post process stage to detection edges of 3Dtileset models. However, so far as I know (I’m rookie in WebGL), the depth value can only be retrieved in the shaders code by uniform sampler2D depthTexture;. We’re wondering is there any way that we can get the depth value of each pixel in current scene inside the JavaScript code. Therefore, we can get the depth values of different world coordinates and draw it on ECharts for further analysis.

We’ve inspected many values of the scene object but found nothing useful. Could somebody please give us some clues?

BTW, we’ve noticed a constant in Cesium which is Cesium.PixelFormat.DEPTH_COMPONENT in the PixelFormat chapter of the Cesium API document. What are the main use cases of these constants, especially DEPTH_COMPONENT? Is it related to the previous issue?