// This is C3E6f_twoTextures from "The Cg Tutorial" (Addison-Wesley, ISBN
// 0321194969) by Randima Fernando and Mark J. Kilgard.  See page 85.

struct C3E5v_Output
{
    float4 positon : POSITION;
    float2 leftTexCoord : TEXCOORD0;
    float2 rightTexCoord : TEXCOORD1;
};

void C3E6f_twoTextures( C3E5v_Output input,

                        out float4 color : COLOR,

                        uniform sampler2D decal)
{
  float4 leftColor  = tex2D(decal, input.leftTexCoord);
  float4 rightColor = tex2D(decal, input.rightTexCoord);
  color = lerp(leftColor, rightColor, 0.5);
}