// force vc7 to group all shader related stuff into the Shader namespace
#ifdef WIN32
namespace Shader {
#endif

// define inputs from application
struct appin
{
  float4 position   : POSITION;
};

// define outputs from vertex shader
struct vertout
{
  float4 position   : POSITION;
  float4 depth      : TEXCOORD0;
};

 vertout vp_main(appin v_in, 
		 uniform float4x4 MVPMatrix)
{
  vertout v_out;

  // Output struct
  //VSOUTPUT_SHADOW OUT = (VSOUTPUT_SHADOW)0;
  // Output the transformed position
  v_out.position = mul(MVPMatrix,v_in.position);
  v_out.depth = v_out.position;
  //OUT.vPosition = mul( inPosition, g_matLightViewProj );

  // transform vertex position into homogenous clip-space
  //v_out.position   = mul(MVPMatrix, v_in.position);
  //v_out.texCoords0 = mul(TPMatrix, v_in.position);
  //v_out.color      = 1.0.xxxx;

  return v_out;
}


// define inputs from vertex program
struct in_fragment
{
  float depth : TEXCOORD0;
};

// define outputs from fragment program
struct out_fragment
 {
   float4 color : COLOR0;
 };
 
// fragment program
 out_fragment fp_main
   (
    // varying parameters
    in_fragment f_in
    )
 {
   out_fragment f_out;
   f_out.color = f_in.depth;//.xxxx;
   //f_out.color.r = 1.0;
   //f_out.color.a = 1.0;
   return f_out;
 }
 
#ifdef WIN32
}
#endif

