// Normal map shader in cg
void main_vp(
	in float4 position : POSITION,
	in float3 normal : NORMAL,
        out float4 outPosition : POSITION,	
        out float4 outColor : COLOR,	
        uniform float4x4 worldViewProj
	)

// calculations of the output position
{
	outPosition = mul(worldViewProj, position);
	outColor.rgb= 0.5*normal+0.5;
	outColor.a = 1.0;
}

void main_fp(
	in float4 color : COLOR,                 	
        out float4 outColor : COLOR
	)	
{	
  outColor = color;	
}