/*
uniform float ScreenHeight;
float blurSize = 0.5 / ScreenHeight;

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].t -= blurSize * 3.0;
  gl_TexCoord[2] = gl_MultiTexCoord0; gl_TexCoord[2].t -= blurSize * 2.0;
  gl_TexCoord[3] = gl_MultiTexCoord0; gl_TexCoord[3].t -= blurSize * 1.0;
  gl_TexCoord[4] = gl_MultiTexCoord0; gl_TexCoord[4].t += blurSize * 1.0;
  gl_TexCoord[5] = gl_MultiTexCoord0; gl_TexCoord[5].t += blurSize * 2.0;
  gl_TexCoord[6] = gl_MultiTexCoord0; gl_TexCoord[6].t += blurSize * 3.0;

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

// gaussian blur by importance sampling, see shaderX7, p.262
uniform float ScreenHeight;
const float sigma = 3.0;
vec2 du1 = vec2(0.0, 0.524/ScreenHeight * sigma);
vec2 du2 = vec2(0.0, 1.282/ScreenHeight * sigma);

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();
}