AdjustTranslucentFS.js 685 B

1234567891011121314151617181920212223242526272829
  1. //This file is automatically rebuilt by the Cesium build process.
  2. export default "#ifdef MRT\n\
  3. layout (location = 0) out vec4 out_FragData_0;\n\
  4. layout (location = 1) out vec4 out_FragData_1;\n\
  5. #else\n\
  6. layout (location = 0) out vec4 out_FragColor;\n\
  7. #endif\n\
  8. \n\
  9. uniform vec4 u_bgColor;\n\
  10. uniform sampler2D u_depthTexture;\n\
  11. \n\
  12. in vec2 v_textureCoordinates;\n\
  13. \n\
  14. void main()\n\
  15. {\n\
  16. if (texture(u_depthTexture, v_textureCoordinates).r < 1.0)\n\
  17. {\n\
  18. #ifdef MRT\n\
  19. out_FragData_0 = u_bgColor;\n\
  20. out_FragData_1 = vec4(u_bgColor.a);\n\
  21. #else\n\
  22. out_FragColor = u_bgColor;\n\
  23. #endif\n\
  24. return;\n\
  25. }\n\
  26. \n\
  27. discard;\n\
  28. }\n\
  29. ";