lensblend.frag 514 B

12345678910111213141516171819202122232425
  1. /*
  2. Lens flare blend
  3. based on bloomblend.frag
  4. author: samuncle
  5. */
  6. uniform sampler2D tex_128;
  7. uniform sampler2D tex_256;
  8. uniform sampler2D tex_512;
  9. out vec4 FragColor;
  10. void main()
  11. {
  12. vec2 uv = gl_FragCoord.xy / screen;
  13. vec4 col = .125 * texture(tex_128, uv);
  14. col += .25 * texture(tex_256, uv);
  15. col += .5 * texture(tex_512, uv);
  16. float final = max(col.r,max(col.g,col.b));
  17. //final = final * 2;
  18. vec3 blue = vec3(final * 0.1, final * 0.2, final);
  19. FragColor = vec4(blue, 1.);
  20. }