// define inputs from application
struct appin
{
  float4 vertexPos     : POSITION;
  float3 normal        : NORMAL; // object space
  float4 diffuseCoords : TEXCOORD0;
};

// define outputs from vertex shader
struct vertout
{
  float4 HPosition         : POSITION;
  float4 diffuseMapCoords  : TEXCOORD0;
  float3 normal            : TEXCOORD1; // object space
  float3 vertexPos         : TEXCOORD2; // object space
};

vertout main(appin IN,

  uniform float4x4 MVPMatrix
  )
{
  vertout OUT;

  // transform vertex position into homogenous clip-space
  OUT.HPosition = mul(MVPMatrix, IN.vertexPos);
  OUT.diffuseMapCoords = IN.diffuseCoords;
  OUT.normal = IN.normal;
  OUT.vertexPos = IN.vertexPos;

  return OUT;
}
