compose.fragment.fx 518 B

12345678910111213141516171819202122232425
  1. #ifdef GL_ES
  2. precision mediump float;
  3. #endif
  4. // Samplers
  5. varying vec2 vUV;
  6. uniform sampler2D textureSampler;
  7. uniform sampler2D sceneSampler;
  8. // Parameters
  9. uniform vec2 screenSize;
  10. uniform float sceneIntensity;
  11. uniform float glowIntensity;
  12. uniform float highlightIntensity;
  13. void main(void)
  14. {
  15. vec4 orig = texture2D(sceneSampler, vUV);
  16. vec4 blur = texture2D(textureSampler, vUV);
  17. vec4 final = sceneIntensity * orig + glowIntensity * blur + highlightIntensity * blur.a;
  18. final.a = 1.0;
  19. gl_FragColor = final;
  20. }