stk-code_catmod/data/shaders/bloomblend.frag

25 lines
550 B
GLSL
Raw Normal View History

uniform sampler2D tex_128;
uniform sampler2D tex_256;
uniform sampler2D tex_512;
2015-07-25 22:48:29 -04:00
uniform sampler2D tex_dust;
out vec4 FragColor;
void main()
{
vec2 uv = gl_FragCoord.xy / u_screen;
vec4 col = .125 * texture(tex_128, uv);
col += .25 * texture(tex_256, uv);
col += .5 * texture(tex_512, uv);
2015-07-25 22:48:29 -04:00
2015-07-25 23:30:29 -04:00
/* Lens dust effect ---- */
vec4 col2 = texture(tex_128, uv);
col2 += col2;
2015-07-26 20:00:34 -04:00
col2 += col2;
2015-07-25 23:30:29 -04:00
//float dustMask = max(col2.r,max(col2.g,col2.b));
col += texture(tex_dust, uv) * col2;
2015-07-25 22:48:29 -04:00
FragColor = vec4(col.xyz, 1.);
}