/*
// gaussian blur standard style
uniform float ScreenWidth;
float blurSize = 0.5 / ScreenWidth;

void main()
{
  // set texture coords
  gl_TexCoord[0] = gl_MultiTexCoord0; // Color Map and normal map share coords
  gl_TexCoord[1] = gl_MultiTexCoord0; gl_TexCoord[1].s -= blurSize * 3.0;
  gl_TexCoord[2] = gl_MultiTexCoord0; gl_TexCoord[2].s -= blurSize * 2.0;
  gl_TexCoord[3] = gl_MultiTexCoord0; gl_TexCoord[3].s -= blurSize * 1.0;
  gl_TexCoord[4] = gl_MultiTexCoord0; gl_TexCoord[4].s += blurSize * 1.0;
  gl_TexCoord[5] = gl_MultiTexCoord0; gl_TexCoord[5].s += blurSize * 2.0;
  gl_TexCoord[6] = gl_MultiTexCoord0; gl_TexCoord[6].s += blurSize * 3.0;

  // transform position
  gl_Position = ftransform();
}
*/

// gaussian blur by importance sampling, see shaderX7, p.262
uniform float ScreenWidth;
vec2 du1 = vec2(1.0/ScreenWidth, 0.0);
vec2 du2 = vec2(2.0/ScreenWidth, 0.0);

void main()
{
  gl_TexCoord[0].st = gl_MultiTexCoord0.st - du2;
  gl_TexCoord[1].st = gl_MultiTexCoord0.st - du1;
  gl_TexCoord[2].st = gl_MultiTexCoord0.st;
  gl_TexCoord[3].st = gl_MultiTexCoord0.st + du1;
  gl_TexCoord[4].st = gl_MultiTexCoord0.st + du2;
  
  gl_Position = ftransform();
}