Get depth value of transparent colored entites in post processing

Hi all,

I am currently working on some post-processing in Cesium (adding a custom fragment shader via a PostProcessStage).
I am working with the “depthTexture” provided by Cesium to the fragment shader and I have some struggles working with Entities that have a color material assigned which has an alpha value smaller than 1.
If I see correctly, those entites are not part of the depthTexture. This makes sense.
However, I was wondering if there is any way to add them to the depth texture if needed.
As you are able to use the picking functions from the Scene class on them, I figured that Cesium already does something along those lines?

If it helps, I could also work with Primitives directly.

Hi @UniquePanda:
I have the same demand. Did you find any way to solve this? Best regards!

Hi @JiaoJianing,
Unfortunately no.
In the end the new possibility of using Custom Shaders solved my problems so that I don’t need any post processing right now.

Scene has the pickTranslucentDepth property, which is false by default. Did you try setting it to true? (I just stumpled upon this question, I haven’t tried it myself).

Unfortunately this doesn’t change anything, if I did it correctly in this sandcastle:

You can see that the box in the middle does not appear when the post processing stage is added.