#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 BlurH (sampler2D source, vec2 size, vec2 uv) {

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

    float width = stride / size.x;
		
		
	A = texture2D(source, (uv + vec2(width * -5., 0.0))) * w1 + texture2D(source, (uv + vec2(width * -4., 0.0))) * w2 + texture2D(source, (uv + vec2(width * -3., 0.0))) * w3
		 + texture2D(source, (uv + vec2(width * -2., 0.0))) * w4 + texture2D(source, (uv + vec2(width * -1., 0.0))) * w5 + texture2D(source, (uv)) * w6
		 + texture2D(source, (uv + vec2(width * 1., 0.0))) * w5 + texture2D(source, (uv + vec2(width * 2., 0.0))) * w4 + texture2D(source, (uv + vec2(width * 3., 0.0))) * w3
		 + texture2D(source, (uv + vec2(width * 4., 0.0))) * w2 + texture2D(source, (uv + vec2(width * 5., 0.0))) * w1;

	A = A / wS;
    return vec4(A.r, A.g, A.b, 1.0);
  
}

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