#version 330

uniform sampler2DRect inputTex;
uniform float uTransitionProgress=1.0;
uniform float uBlackLevel=0;
uniform float uBlueLevel=0;
uniform float uGreenLevel=0;
uniform float uRedLevel=0;
uniform float uGamma=0;

in vec2 fsTexture;
out vec4 outColor;

void main()
{
    outColor = texture(inputTex, fsTexture);
    outColor.rgb=pow(outColor.rgb,vec3(1.0+uGamma));
    outColor+=vec4(uRedLevel,uGreenLevel,uBlueLevel,0.0);
    float range=1.0-uBlackLevel;
    outColor.rgb*=range;
    outColor.rgb+=uBlackLevel;
}


