     vec4 color0 = texture(inport0Color, texCoords);
     vec4 color1 = texture(inport1Color, texCoords);
     vec4 result = COLOR_BLENDING(color0, color1);
-    // mix result with original color,
-    // if (weight_ == 1) the final color will be the result of the blending operation
+  
     FragData0 = result;
     gl_FragDepth = min(texture(inport0Depth, texCoords).r,texture(inport1Depth, texCoords).r);
 


vec4 screen(vec4 colorA, vec4 colorB) {
    // f(a,b) = 1 - (1 - a) * (1 - b)
    return vec4(1.0 - (1.0 - colorA.rgb) * (1.0 - colorB.rgb), max(colorA.a,colorB.a));
}

vec4 overlay(vec4 colorA, vec4 colorB) {
    // f(a,b) = 2 * a *b, if a < 0.5,   
    //        = 1 - 2(1 - a)(1 - b), otherwise (combination of Multiply and Screen)
    bvec3 less = lessThan(colorA.rgb, vec3(0.5));
    vec3 high =  1.0 - 2.0 * (1.0 - colorA.rgb) * (1.0 - colorB.rgb);
    vec3 low = 2.0 * colorA.rgb * colorB.rgb;

    return vec4(mix(high, low, less), max(colorA.a,colorB.a));
}

}

vec4 addition(vec4 colorA, vec4 colorB) {
    // f(a,b) = a + b
    return vec4(colorA.rgb + colorB.rgb, max(colorA.a,colorB.a));
}

vec4 subtraction(vec4 colorA, vec4 colorB) {
    // f(a,b) = a - b
    return vec4(colorA.rgb - colorB.rgb, max(colorA.a,colorB.a));
}

