// Global constants
float2 tapOffsets[3];
float4 pixelSize;

// Output structure
struct VS_OUTPUT
{
	float4 position : POSITION;
	float2 tap0 : TEXCOORD0; 
	float2 tap1 : TEXCOORD1; 
	float2 tap2 : TEXCOORD2; 
	float2 tap3 : TEXCOORD3; 
	float2 tapNeg1 : TEXCOORD4; 
	float2 tapNeg2 : TEXCOORD5; 
	float2 tapNeg3 : TEXCOORD6; 
};

// Entry point
VS_OUTPUT Main( float4 position : POSITION)
{
	VS_OUTPUT outputVertex = (VS_OUTPUT)0;
	
	outputVertex.position.xy = position.xy + pixelSize.xy;
	
	outputVertex.position.z = 0.5f;
	outputVertex.position.w = 1.0f;
	outputVertex.tap0 = float2(0.5f, -0.5f) * position.xy + 0.5f.xx;
	
	outputVertex.tap1 = outputVertex.tap0 + tapOffsets[0];
	outputVertex.tap2 = outputVertex.tap0 + tapOffsets[1];
	outputVertex.tap3 = outputVertex.tap0 + tapOffsets[2];
	
	outputVertex.tapNeg1 = outputVertex.tap0 - tapOffsets[0];
	outputVertex.tapNeg2 = outputVertex.tap0 - tapOffsets[1];
	outputVertex.tapNeg3 = outputVertex.tap0 - tapOffsets[2];
	
	return outputVertex;
}