34935-vm/assets/cesium/packages/engine/Source/Shaders/CompareAndPackTranslucentDepth.glsl
Flatlogic Bot 055d24df95 WORKING
2025-10-14 02:37:44 +00:00

13 lines
455 B
GLSL

uniform sampler2D u_opaqueDepthTexture;
uniform sampler2D u_translucentDepthTexture;
in vec2 v_textureCoordinates;
void main()
{
float opaqueDepth = texture(u_opaqueDepthTexture, v_textureCoordinates).r;
float translucentDepth = texture(u_translucentDepthTexture, v_textureCoordinates).r;
translucentDepth = czm_branchFreeTernary(translucentDepth > opaqueDepth, 1.0, translucentDepth);
out_FragColor = czm_packDepth(translucentDepth);
}