]> git.sesse.net Git - movit/blobdiff - lift_gamma_gain_effect.frag
Add the rest of the files for the premultiplied alpha commit.
[movit] / lift_gamma_gain_effect.frag
index acd9d5162ca34c219bfa555feb191c1ea5a2cbd8..775941ebc641e35049b7b333422eed4b9e237dcc 100644 (file)
@@ -5,10 +5,12 @@ uniform vec3 PREFIX(inv_gamma_22);  // 2.2 / gamma.
 vec4 FUNCNAME(vec2 tc) {
        vec4 x = INPUT(tc);
 
+       x.rgb /= x.aaa;
        x.rgb = pow(x.rgb, vec3(1.0/2.2));
        x.rgb += PREFIX(lift) * (vec3(1) - x.rgb);
        x.rgb = pow(x.rgb, PREFIX(inv_gamma_22));
        x.rgb *= PREFIX(gain_pow_inv_gamma);
+       x.rgb *= x.aaa;
 
        return x;
 }