1 // These are calculated in the host code to save some arithmetic.
2 uniform vec3 PREFIX(gain_pow_inv_gamma); // gain^(1/gamma).
3 uniform vec3 PREFIX(inv_gamma_22); // 2.2 / gamma.
5 vec4 FUNCNAME(vec2 tc) {
8 x.rgb = pow(x.rgb, vec3(1.0/2.2));
9 x.rgb += PREFIX(lift) * (vec3(1) - x.rgb);
10 x.rgb = pow(x.rgb, PREFIX(inv_gamma_22));
11 x.rgb *= PREFIX(gain_pow_inv_gamma);