//
// green triangle C2E1v_green
// 01-06-09: Created by (boomer541)
//

void main(
	  struct C2E1v_Output : TRIANGLE,
	  float4 position   : POSITION,
	  float4 color      : COLOR,
	  // Output
      //out float4 outPosition      : POSITION,
      //out float3 outNormalOrg     : COLOR,
      //out float3 outEyePosW       : COLOR,
	//  out float2 outTC0           : TEXCOORD0,
	  //out float3 outNormal        : TEXCOORD1,
	  //out float3 outPosW          : TEXCOORD2,
	  //out float  reflectionFactor : TEXCOORD3,
	  //out float3 R                : TEXCOORD4,			// Reflection vector
	  //out float3 lightDirTS       : TEXCOORD5,          // Light direction in tangent space
	  //out float3 outEyeDir        : TEXCOORD6,			// Varying over polygon
  // Params
  //uniform float4x4 modelViewProj,
  //uniform float4x4 modelView,
  //uniform float4x4 modelMatrix,
  //uniform float4x4 modelMatrixInv,
  //uniform float3   eyePosW,
  //uniform float3   lightDirection
)
  // Calculate eyeDir in tangent space
//  float3 v;
  // First calculate eye to vertex direction in world coords
//  v=eyePosW-mul(modelMatrix,inPosition).xyz;
  // Transform into surface coords
//  outEyeDir=normalize(mul(tbnMatrix,v));
  
  // Specular approximation
  //outEyeDir=1.0-dot(normalize(lightDirTS),normalize(outEyeDir));
  
  // Convert eye world pos to tangent space
  //float3 epw=mul(modelView,float4(eyePosW,1)).xyz;
  //outEyePosW=mul(tbnMatrix,eyePosW);
  //outEyePosW=outEyeDir;


//struct C2E1v_Output
 {

  float4 position : POSITION;

  float4 color    : COLOR;

};

C2E1v_Output C2E1v_green(float2 position : POSITION)

{

  C2E1v_Output OUT;

  OUT.position = float4(position, 0, 1);

  OUT.color    = float4(0, 1, 0, 1);  // RGBA green

  return OUT;

}