CompareAndPackTranslucentDepth.js 584 B

1234567891011121314
  1. //This file is automatically rebuilt by the Cesium build process.
  2. export default "uniform sampler2D u_opaqueDepthTexture;\n\
  3. uniform sampler2D u_translucentDepthTexture;\n\
  4. \n\
  5. varying vec2 v_textureCoordinates;\n\
  6. \n\
  7. void main()\n\
  8. {\n\
  9. float opaqueDepth = texture2D(u_opaqueDepthTexture, v_textureCoordinates).r;\n\
  10. float translucentDepth = texture2D(u_translucentDepthTexture, v_textureCoordinates).r;\n\
  11. translucentDepth = czm_branchFreeTernary(translucentDepth > opaqueDepth, 1.0, translucentDepth);\n\
  12. gl_FragColor = czm_packDepth(translucentDepth);\n\
  13. }\n\
  14. ";