You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
13 lines
463 B
GLSL
13 lines
463 B
GLSL
uniform sampler2D u_opaqueDepthTexture;
|
|
uniform sampler2D u_translucentDepthTexture;
|
|
|
|
varying vec2 v_textureCoordinates;
|
|
|
|
void main()
|
|
{
|
|
float opaqueDepth = texture2D(u_opaqueDepthTexture, v_textureCoordinates).r;
|
|
float translucentDepth = texture2D(u_translucentDepthTexture, v_textureCoordinates).r;
|
|
translucentDepth = czm_branchFreeTernary(translucentDepth > opaqueDepth, 1.0, translucentDepth);
|
|
gl_FragColor = czm_packDepth(translucentDepth);
|
|
}
|