1 varying vec2 samplePos1;
2 varying vec2 samplePos2;
3 varying vec2 samplePos3;
4 varying vec2 samplePos4;
5 varying vec2 samplePos5;
7 uniform float textureWidth;
8 uniform float textureHeight;
10 attribute float yBlur;
13 vec2 mkSamplePos(vec2 origin, float offset)
15 vec2 foo = origin + vec2(xBlur, yBlur) * offset;
16 return vec2(foo.x / textureWidth, 1.0 - foo.y / textureHeight);
21 samplePos1 = mkSamplePos(gl_Vertex.xy, 0.0);
22 samplePos2 = mkSamplePos(gl_Vertex.xy, -1.5);
23 samplePos3 = mkSamplePos(gl_Vertex.xy, 1.5);
24 samplePos4 = mkSamplePos(gl_Vertex.xy, 3.5);
25 samplePos5 = mkSamplePos(gl_Vertex.xy, -3.5);
27 gl_Position = ftransform();