AdjustTranslucentFS.js 508 B

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