#version 150
in vec2 textureCoordinate;

uniform sampler2D imgTexture;
uniform int inkEffect;
uniform vec4 blendColor;

out vec4 fragColor;

void main()
{
    vec4 color = texture(imgTexture, textureCoordinate) * blendColor;

    if(inkEffect == 2)            //INVERT
        color.rgb = vec3(1,1,1)-color.rgb;
    else if(inkEffect == 10)    //MONO
    {
        float mono = 0.3125*color.r + 0.5625*color.g + 0.125*color.b;
        color.rgb = vec3(mono,mono,mono);
    }
    
    fragColor = color; //gl_FragColor
}
