AdjustTranslucentFS.js 639 B

1234567891011121314151617181920212223242526272829
  1. //This file is automatically rebuilt by the Cesium build process.
  2. /*global define*/
  3. define(function() {
  4. "use strict";
  5. return "#ifdef MRT\n\
  6. #extension GL_EXT_draw_buffers : enable\n\
  7. #endif\n\
  8. \n\
  9. uniform vec4 u_bgColor;\n\
  10. uniform sampler2D u_depthTexture;\n\
  11. \n\
  12. varying vec2 v_textureCoordinates;\n\
  13. \n\
  14. void main()\n\
  15. {\n\
  16. if (texture2D(u_depthTexture, v_textureCoordinates).r < 1.0)\n\
  17. {\n\
  18. #ifdef MRT\n\
  19. gl_FragData[0] = u_bgColor;\n\
  20. gl_FragData[1] = vec4(u_bgColor.a);\n\
  21. #else\n\
  22. gl_FragColor = u_bgColor;\n\
  23. #endif\n\
  24. return;\n\
  25. }\n\
  26. \n\
  27. discard;\n\
  28. }";
  29. });