#define iChannel0 inputImageTexture
#define fragColor gl_FragColor
#define w1 0.033159047
#define w2 0.054670025
#define w3 0.08065691
#define w4 0.10648267
#define w5 0.12579441
#define w6 0.13298076
#define wS 0.9345069

precision highp float;

varying vec2 textureCoordinate;
uniform sampler2D inputImageTexture;
uniform vec2 iResolution;
uniform float stride;

vec4 BlurV (sampler2D source, vec2 size, vec2 uv) {

        vec4 A = vec4(0.0);
        vec4 C = vec4(0.0);

        float height = stride / size.y;

        A = texture2D(source, ( uv + vec2(0., height * -5.))) * w1 + texture2D(source, (uv + vec2(0., height * -4.))) * w2 + texture2D(source, (uv + vec2(0., height * -3.))) * w3
		 + texture2D(source, (uv + vec2(0., height * -2.))) * w4 + texture2D(source, (uv + vec2(0., height * -1.))) * w5 + texture2D(source, (uv)) * w6
		 + texture2D(source, (uv + vec2(0., height * 1.))) * w5 + texture2D(source, (uv + vec2(0., height * 2.))) * w4 + texture2D(source, (uv + vec2(0., height * 3.))) * w3
		 + texture2D(source, (uv + vec2(0., height * 4.))) * w2 + texture2D(source, (uv + vec2(0., height * 5.))) * w1;
		
		A = A / wS;
		
       return vec4(A.r , A.g, A.b , 1.0);
}

void main()
{
    // Apply vertical blur to buffer A
    fragColor = BlurV(iChannel0, iResolution.xy, textureCoordinate);
}