#version 330

uniform sampler2DRect inputTex;
uniform sampler2DRect inputTex1;
uniform float transitionProgress=1.0;
uniform float transitionAlpha=1.0;
uniform float baseAlpha=1.0;

in vec2 fsTexture;
in vec2 fsTexture2;

out vec4 outColor;

void main()
{
    vec4 colorA = texture(inputTex, fsTexture);
    vec4 colorB = texture(inputTex1, fsTexture2);
    outColor=mix(colorB,colorA,transitionProgress)*baseAlpha;
//color channel dissolve
//    float redMix=clamp(transitionProgress*3.,0.,1.);
//    float greenMix=clamp((transitionProgress-.33)*3.,0.,1.);
//    float blueMix=clamp((transitionProgress-.66)*3.,0.,1.);
//    outColor.r=mix(colorB.r,colorA.r,redMix);
//    outColor.g=mix(colorB.g,colorA.g,greenMix);
//    outColor.b=mix(colorB.b,colorA.b,blueMix);
//    outColor.a=colorA.a;
}


