//
// Diffuse color only (demo)
// Base for per-fragment lighting
//

void main(
	  float4 inPosition : POSITION,
	  float3 inNormal   : NORMAL,
	  float2 inTC0      : TEXCOORD0,
	  // Output
      out float4 outPosition      : POSITION,
      //out float4 outColor         : COLOR,
	  out float2 outTC0           : TEXCOORD0,
	  out float3 outNormal        : TEXCOORD1,
	  out float3 outPosW          : TEXCOORD2,
  
  // Params
  uniform float4x4 modelViewProj,
  uniform float4x4 modelMatrix
)
{
  // Transform vertex
  outPosition = mul(modelViewProj,inPosition);
  outPosW=inPosition;
  
  // Pass texcoords
  outTC0 = inTC0;

  // Transform normal with model transformation
  outNormal = mul(float3x3(modelMatrix),inNormal);
}
