How to set the transparency of imagery layer when turning on globe transparency?

After turning on globe transparency, the imagery layer will also become transparent. How can we independently set the transparency of the imagery layer so that it is not affected by globe transparency?

https://cesium.com/learn/cesiumjs/ref-doc/GlobeTranslucency.html

// Set back face translucency to 0.5.
globe.translucency.backFaceAlpha = 0.5;
globe.translucency.enabled = true;

https://cesium.com/learn/cesiumjs/ref-doc/ImageryLayer.html?classFilter=imag#alpha

imageryLayer.alpha = 0.5;

@sean_lilley

Would you mind helping me out?

Thanks.

Hi @SAYEOR, is something like this what you’re going for? The base layer is translucent while the imagery layer on top is opaque.

Here’s a sandcastle showing what the code looks like:

@sean_lilley, thanks for your help!

It works! But after not using OIT, additional caution is needed to add other transparent objects.

Yes, unfortunately this technique only works with OIT disabled.