/**
 * Copyright (C) 2013 Stellar Jockeys.
 * All Rights Reserved.
 *
 * NOTICE: All information contained herein is, and remains the property of
 * Stellar Jockeys and its suppliers, if any.  The intellectual and technical
 * concepts contained herein are proprietary to Stellar Jockeys and its suppliers.
 * Dissemination of this information or reproduction of this material is
 * strictly forbidden unless prior written permission is obtained from
 * Stellar Jockeys.
 *
 * @file colored.frag
 * @date 01/19/2013
 */
#version 120
uniform sampler2D uTexture;
uniform vec2 uBlend;
uniform float uIsFont;
varying vec2 vTextureCoord;
varying vec3 vColorShift;
varying vec4 vColor;

//#include <fragcolorshift.glsl>
//#include <fragblend.glsl>

void main()
{
    vec4 color = texture2D(uTexture, vTextureCoord);

    if (uIsFont > 0.0)
    {
        color = color.aaar;
    }

    if (color.a < (1.0 / 255.0))
    {
        discard;
    }

    color = ShiftColor(vColorShift, color * vColor);
    gl_FragColor = BlendedColor(color.rgb, color.a, uBlend);
}
