//
// Bumpmap road
//

void main(
	  float4 inPosition : POSITION,
	  float2 inTexCoord : TEXCOORD0,
	  float4 tangent    : TANGENT,
	  float3 normal     : NORMAL,
  
  out float4 outPosition      : POSITION,
  out float2 outTexCoord      : TEXCOORD0,
  out float3 outLightDirection: TEXCOORD1,
  out float3 outColor         : COLOR,
  
  uniform float4x4 modelViewProj
)
{
  float4 lightPosition=float4(-2052.0,1555.0,3160.0,0);

  // Transform light
  float4 tfLightPos=mul(modelViewProj, lightPosition);

  // Transform vertex
  outPosition = mul(modelViewProj, inPosition);
  outTexCoord = inTexCoord;
  // Difference vectors for object-space light direction
  //lightDirection = lightPosition - position.xyz;
  //lightDirection = tfLightPos  - position.xyz;
  outLightDirection = tfLightPos;
  
  //outColor=tangent;
  outColor=normal;
}
