The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.
// input fragment
struct FragIn
{
  float2 texcoord : TEXCOORD0;
};
 
// output fragment
struct FragOut
{
  float4 color : COLOR;
};

uniform float4 surfacecolor;
 
// fragment shader main entry
FragOut main(FragIn IN)
{
  FragOut OUT;
  float1 v = 2.0 * IN.texcoord.y;
  v = 1.01f - abs(1.0f - v);  // Some cards have a rounding error
  OUT.color = float4(v,v,v, 1.0f) * surfacecolor;
  return OUT;
}