BloomComposite.glsl 440 B

1234567891011121314151617181920
  1. uniform sampler2D colorTexture;
  2. uniform sampler2D bloomTexture;
  3. uniform bool glowOnly;
  4. varying vec2 v_textureCoordinates;
  5. void main(void)
  6. {
  7. vec4 color = texture2D(colorTexture, v_textureCoordinates);
  8. #ifdef CZM_SELECTED_FEATURE
  9. if (czm_selected()) {
  10. gl_FragColor = color;
  11. return;
  12. }
  13. #endif
  14. vec4 bloom = texture2D(bloomTexture, v_textureCoordinates);
  15. gl_FragColor = glowOnly ? bloom : bloom + color;
  16. }