uniform float4x4 _matrix; // to scale (down) area to process uniform float4x4 projection; struct IN { float3 screenVertex : POSITION; float2 uv : TEXCOORD0; }; struct OUT { float4 position : POSITION; float2 uv : TEXCOORD0; }; OUT main(in IN input) { OUT output; float4 uvs = float4(input.uv, 0, 1); float4 pos = float4(input.screenVertex,1.0f); uvs = mul(_matrix, uvs); output.position = pos; output.uv = uvs.xy; output.uv.y = 1 - input.uv.y; return output; }