1
2
3
4
5
6
7
8
9
10
float2 Viewport;
void SpriteVertexShader(inout float4 color : COLOR0,
                        inout float2 texCoord : TEXCOORD0,
                        inout float4 position : POSITION0)
{
   position.xy -= 0.5;
   position.xy = position.xy / Viewport;
   position.xy *= float2(2, -2);
   position.xy -= float2(1, -1);
}