
// by my thinking, sample will wind up between 4 pixels. offset to center
// of four pixels, or would filtering take care of it for me? i think
// filtering is set to nearest, so i don't expect that to happen.

uniform float ScreenWidth;
uniform float ScreenHeight;

vec2 offset = vec2( 0.5 / ScreenWidth, 0.5 / ScreenHeight );

void main()
{
  // set texture coords
  gl_TexCoord[0].st = gl_MultiTexCoord0.st + vec2( offset.x, offset.y ); 
  gl_TexCoord[1].st = gl_MultiTexCoord0.st + vec2(-offset.x, offset.y );
  gl_TexCoord[2].st = gl_MultiTexCoord0.st + vec2( offset.x,-offset.y );
  gl_TexCoord[3].st = gl_MultiTexCoord0.st + vec2(-offset.x,-offset.y );

  // transform position
  gl_Position = ftransform();
}