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

// define inputs from vertex program
struct in_fragment
{
  float4 texCoord0 : TEXCOORD0;
  float3 texCoord1 : TEXCOORD1;
};

// define outputs from fragment program
struct out_fragment
{
  float4 color : COLOR0;
};

// fragment program
out_fragment main
(
 // varying parameters
 in_fragment f_in,
 
 // uniform samplers (textures)
 uniform sampler2D diffuseMap : TEXUNIT0,
 uniform sampler2D lightMap : TEXUNIT1
 )
 {
   out_fragment f_out;

   f_out.color  = tex2D(diffuseMap, f_in.texCoord0.xy);
   f_out.color *= tex2D(lightMap, f_in.texCoord1.xy);

   //f_out.color = 1.0.xxxx;   
   //f_out.color.a = 1.0;

   return f_out;
 }

#ifdef WIN32
}
#endif

