#version 330 core

// Post-fx pass: 9-tap vertical gaussian blur (bloom blur, separable with blurh).
in vec2 ex_Uv;
out vec4 fragColor;

uniform sampler2D iChannel0;
uniform vec2 iResolution;

void main() {
	vec2 px = 1.0 / iResolution;
	float w[5] = float[](0.227, 0.194, 0.121, 0.054, 0.016);
	vec3 s = texture(iChannel0, ex_Uv).rgb * w[0];
	for (int i = 1; i < 5; ++i) {
		vec2 o = vec2(0.0, px.y * float(i) * 2.0);
		s += texture(iChannel0, ex_Uv + o).rgb * w[i];
		s += texture(iChannel0, ex_Uv - o).rgb * w[i];
	}
	fragColor = vec4(s, 1.0);
}
