struct fragment {
	float4 position : POSITION;
	float2 texcoord : TEXCOORD0;
	float3 normal : COLOR0;
};

fragment main(
	float4 position : POSITION,
	float2 texcoord : TEXCOORD0,
	float4 normal : NORMAL,
	uniform float4x4 modelViewProj,
	uniform float2x2 textureMatrix,
	uniform float4x4 modelViewIT)
{
	fragment OUT;

	OUT.position = mul(modelViewProj, position);
	OUT.texcoord = mul(textureMatrix, texcoord);
	//OUT.normal.xyz = normalize(mul(modelViewIT, normal).xyz);
	OUT.normal = 0.5+0.5*normal;

	return OUT;
}