AdjustTranslucentFS.js 576 B

1234567891011121314151617181920212223242526
  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. \n\
  6. uniform vec4 u_bgColor;\n\
  7. uniform sampler2D u_depthTexture;\n\
  8. \n\
  9. varying vec2 v_textureCoordinates;\n\
  10. \n\
  11. void main()\n\
  12. {\n\
  13. if (texture2D(u_depthTexture, v_textureCoordinates).r < 1.0)\n\
  14. {\n\
  15. #ifdef MRT\n\
  16. gl_FragData[0] = u_bgColor;\n\
  17. gl_FragData[1] = vec4(u_bgColor.a);\n\
  18. #else\n\
  19. gl_FragColor = u_bgColor;\n\
  20. #endif\n\
  21. return;\n\
  22. }\n\
  23. \n\
  24. discard;\n\
  25. }\n\
  26. ";