////////////////////////////////////////////////////////////////
///
/// Samplers
///
////////////////////////////////////////////////////////////////
sampler GLYPH_TEXTURE : register (s0);

////////////////////////////////////////////////////////////////
///
/// Constants
///
////////////////////////////////////////////////////////////////
float4 FONT_COLOR : register(c20);

////////////////////////////////////////////////////////////////
///
/// main
///
////////////////////////////////////////////////////////////////
struct INTERPOLANTS
{
    float2 glyphTexCoord : TEXCOORD0;
};

void main(in INTERPOLANTS interpolants,
          out float4 outColor : COLOR0)
{
    // sample textures
    float4 glyphTexture = tex2D(GLYPH_TEXTURE, interpolants.glyphTexCoord);

    // compose the pixel value
    float strength = glyphTexture.b;
    outColor.rgb = strength * FONT_COLOR.rgb;
    outColor.a = 1.0f - strength;
}
