uniform float ScreenWidth;
uniform float ScreenHeight;

vec2 offset0 = vec2( 1.0 / ScreenWidth, 1.0 / ScreenHeight );
vec2 offset1 = vec2(-1.0 / ScreenWidth, 1.0 / ScreenHeight );
vec2 offset2 = vec2(-1.0 / ScreenWidth,-1.0 / ScreenHeight );
vec2 offset3 = vec2( 1.0 / ScreenWidth,-1.0 / ScreenHeight );

void main()
{
  // set texture coords
  gl_TexCoord[0] = gl_MultiTexCoord0; // Color Map and normal map share coords
  gl_TexCoord[1] = gl_MultiTexCoord0 + offset0.xyyy;
  gl_TexCoord[2] = gl_MultiTexCoord0 + offset1.xyyy;
  gl_TexCoord[3] = gl_MultiTexCoord0 + offset2.xyyy;
  gl_TexCoord[4] = gl_MultiTexCoord0 + offset3.xyyy;

  // transform position
  gl_Position = ftransform();
}