
varying vec2 v_TexCoord;
uniform vec4 u_Color;
uniform sampler2D u_Tex0;

void main()
{
    vec4 texColor = texture2D(u_Tex0, v_TexCoord);
    if(texColor.a < 0.01) discard;

    // Subtle contrast and saturation adjustment for "HD" feeling
    // Contrast boost
    texColor.rgb = ((texColor.rgb - 0.5) * 1.04) + 0.5;
    
    // Saturation boost
    float luminance = dot(texColor.rgb, vec3(0.299, 0.587, 0.114));
    texColor.rgb = mix(vec3(luminance), texColor.rgb, 1.02);

    gl_FragColor = texColor * u_Color;
}
