
#version 130
precision mediump float;

uniform sampler2D SamplerBGRA;
//uniform sampler2D SamplerTableTex1;
//uniform sampler2D SamplerTableTex2;
//uniform sampler2D SamplerBackTex1;
//uniform sampler2D SamplerBackTex2;

out     vec4 		outText;	// output sampler

uniform mediump float size_x;
uniform mediump float size_y;
uniform mediump float kk;
uniform mediump float which;

void main(void)
{
	vec2 v_texCoord = gl_TexCoord[0].st;

    mediump float off_x = 1.0/size_x;
    mediump float off_y = 1.0/size_y;
    vec2 blurSize = vec2(off_x, off_y);

	vec4 sum = vec4(0.0);
	sum += texture2D(SamplerBGRA, v_texCoord - 4.0 * blurSize) * 0.05;
	sum += texture2D(SamplerBGRA, v_texCoord - 3.0 * blurSize) * 0.09;
	sum += texture2D(SamplerBGRA, v_texCoord - 2.0 * blurSize) * 0.12;
	sum += texture2D(SamplerBGRA, v_texCoord - 1.0 * blurSize) * 0.15;
	sum += texture2D(SamplerBGRA, v_texCoord                 ) * 0.16;
	sum += texture2D(SamplerBGRA, v_texCoord + 1.0 * blurSize) * 0.15;
	sum += texture2D(SamplerBGRA, v_texCoord + 2.0 * blurSize) * 0.12;
	sum += texture2D(SamplerBGRA, v_texCoord + 3.0 * blurSize) * 0.09;
	sum += texture2D(SamplerBGRA, v_texCoord + 4.0 * blurSize) * 0.05;
    
    outText.rgba = sum.rgba;
}