float2 R:TARGETSIZE;

cbuffer controls:register(b0){
	int2 BoardSize  = int2(8, 6);
};

float4 pChessboard(float4 PosWVP:SV_POSITION,float2 x:TEXCOORD0):SV_Target{
    float2 index = floor(R * x); // some weird hack one day, needed to add 2, shouldn't 
	return (index.x + (index.y % 2)) % 2;
}

technique10 Chessboard{
	pass P1
	{
		SetPixelShader(CompileShader(ps_4_0,pChessboard()));
	}
}