#ifdef GL_ES
precision highp float;
#else
#define highp
#define mediump
#define lowp
#endif

// ------- ATTRIBUTES (VERTEX BUFFER DATA) -------
attribute vec4		attrVertex;
attribute vec4		attrTex0UV;

// ------- UNIFORMS (SHADER CONSTS) -------
uniform mat4		hu_mPMVMatrix;
uniform vec2		hu_vDimsTexture0;
uniform float		u_fStep;

// ------- INTERPOLATORS (SHADER OUTPUTS) -------
varying vec2		v_vTex[9];

void main(void)
{
	gl_Position = hu_mPMVMatrix*attrVertex;
	
	float blurSize = u_fStep/hu_vDimsTexture0.x;
	
	v_vTex[0] = vec2(attrTex0UV.x - 4.0*blurSize, attrTex0UV.y);
	v_vTex[1] = vec2(attrTex0UV.x - 3.0*blurSize, attrTex0UV.y);
	v_vTex[2] = vec2(attrTex0UV.x - 2.0*blurSize, attrTex0UV.y);
	v_vTex[3] = vec2(attrTex0UV.x - blurSize, attrTex0UV.y);
	v_vTex[4] = attrTex0UV.xy;
	v_vTex[5] = vec2(attrTex0UV.x + blurSize, attrTex0UV.y);
	v_vTex[6] = vec2(attrTex0UV.x + 2.0*blurSize, attrTex0UV.y);
	v_vTex[7] = vec2(attrTex0UV.x + 3.0*blurSize, attrTex0UV.y);
	v_vTex[8] = vec2(attrTex0UV.x + 4.0*blurSize, attrTex0UV.y);
}
