BloomComposite.js 533 B

123456789101112131415161718
  1. //This file is automatically rebuilt by the Cesium build process.
  2. export default "uniform sampler2D colorTexture;\n\
  3. uniform sampler2D bloomTexture;\n\
  4. uniform bool glowOnly;\n\
  5. varying vec2 v_textureCoordinates;\n\
  6. void main(void)\n\
  7. {\n\
  8. vec4 color = texture2D(colorTexture, v_textureCoordinates);\n\
  9. #ifdef CZM_SELECTED_FEATURE\n\
  10. if (czm_selected()) {\n\
  11. gl_FragColor = color;\n\
  12. return;\n\
  13. }\n\
  14. #endif\n\
  15. vec4 bloom = texture2D(bloomTexture, v_textureCoordinates);\n\
  16. gl_FragColor = glowOnly ? bloom : bloom + color;\n\
  17. }\n\
  18. ";