]> git.sesse.net Git - movit/blobdiff - gamma_expansion_effect.frag
Remove C++11 dependency from ResampleEffect.
[movit] / gamma_expansion_effect.frag
index 051d2faf1042cc47e0be4b3b715dba67c0333794..b8e3581f53772107880d9b90b68981a95e9f35d9 100644 (file)
@@ -2,7 +2,7 @@
 
 // Implicit uniforms:
 // uniform float PREFIX(linear_scale);
-// uniform float PREFIX(c0), PREFIX(c1), PREFIX(c2), PREFIX(c3), PREFIX(c4);
+// uniform float PREFIX(c)[5];
 // uniform float PREFIX(beta);
 
 vec4 FUNCNAME(vec2 tc) {
@@ -11,7 +11,7 @@ vec4 FUNCNAME(vec2 tc) {
        vec3 a = x.rgb * PREFIX(linear_scale);
 
        // Fourth-order polynomial approximation to pow(). See the .cpp file for details.
-       vec3 b = PREFIX(c0) + (PREFIX(c1) + (PREFIX(c2) + (PREFIX(c3) + PREFIX(c4) * x.rgb) * x.rgb) * x.rgb) * x.rgb;
+       vec3 b = PREFIX(c[0]) + (PREFIX(c[1]) + (PREFIX(c[2]) + (PREFIX(c[3]) + PREFIX(c[4]) * x.rgb) * x.rgb) * x.rgb) * x.rgb;
 
        vec3 f = vec3(greaterThan(x.rgb, vec3(PREFIX(beta))));
        x = vec4(mix(a, b, f), x.a);