2014-11-11 19:22:33 -05:00
|
|
|
/*
|
|
|
|
Lens flare blend
|
|
|
|
based on bloomblend.frag
|
|
|
|
author: samuncle
|
|
|
|
*/
|
2014-11-04 15:15:18 -05:00
|
|
|
uniform sampler2D tex_128;
|
|
|
|
uniform sampler2D tex_256;
|
|
|
|
uniform sampler2D tex_512;
|
|
|
|
|
|
|
|
out vec4 FragColor;
|
|
|
|
|
|
|
|
void main()
|
|
|
|
{
|
|
|
|
vec2 uv = gl_FragCoord.xy / screen;
|
|
|
|
vec4 col = .125 * texture(tex_128, uv);
|
|
|
|
col += .25 * texture(tex_256, uv);
|
|
|
|
col += .5 * texture(tex_512, uv);
|
|
|
|
|
2015-07-25 19:46:19 -04:00
|
|
|
//col *= 0.5;
|
|
|
|
|
|
|
|
|
|
|
|
//float final = max(col.r,max(col.g,col.b));
|
2014-11-04 15:15:18 -05:00
|
|
|
//final = final * 2;
|
2015-07-25 19:46:19 -04:00
|
|
|
//vec3 blue = vec3(final * 0.1, final * 0.2, final);
|
2014-11-04 15:15:18 -05:00
|
|
|
|
2015-07-25 19:46:19 -04:00
|
|
|
FragColor = vec4(col.rgb, 1.);
|
2014-11-04 15:15:18 -05:00
|
|
|
}
|