]> git.sesse.net Git - movit/commitdiff
Replace LAST_INPUT with INPUT.
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Thu, 4 Oct 2012 15:28:15 +0000 (17:28 +0200)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Thu, 4 Oct 2012 15:28:15 +0000 (17:28 +0200)
15 files changed:
blur_effect.frag
colorspace_conversion_effect.frag
effect_chain.cpp
footer.frag
footer.vert
gamma_compression_effect.frag
gamma_expansion_effect.frag
header.frag
header.vert
identity.frag
lift_gamma_gain_effect.frag
mirror_effect.frag
sandbox_effect.frag
saturation_effect.frag
vignette_effect.frag

index 7e5a42430f986aaa4c92a2e80708d11db5de7960..c6e4cf5465e7cbf62178edd8e231d8c962b8c1d2 100644 (file)
@@ -5,10 +5,10 @@
 uniform vec4 PREFIX(samples)[NUM_TAPS + 1];
 
 vec4 FUNCNAME(vec2 tc) {
-       vec4 sum = vec4(PREFIX(samples)[0].z) * LAST_INPUT(tc);
+       vec4 sum = vec4(PREFIX(samples)[0].z) * INPUT(tc);
        for (int i = 1; i < NUM_TAPS + 1; ++i) {
                vec4 sample = PREFIX(samples)[i];
-               sum += vec4(sample.z) * (LAST_INPUT(tc - sample.xy) + LAST_INPUT(tc + sample.xy));
+               sum += vec4(sample.z) * (INPUT(tc - sample.xy) + INPUT(tc + sample.xy));
        }
        return sum;
 }
index ea858fb37885b6e979f180c2a7665143327ce743..6ec8e55d385b4e82e9fe020699cc52d12df315da 100644 (file)
@@ -2,7 +2,7 @@
 // The matrix is computed on the host and baked into the shader at compile time.
 
 vec4 FUNCNAME(vec2 tc) {
-       vec4 x = LAST_INPUT(tc);
+       vec4 x = INPUT(tc);
        x.rgb = PREFIX(conversion_matrix) * x.rgb;
        return x;
 }
index fcf94f8505299c0ec12156c8ab427b06e9fa73c0..6362a095adb554dc6adf0e7978f7b3d678e7dfed 100644 (file)
@@ -153,8 +153,8 @@ EffectChain::Phase EffectChain::compile_glsl_program(unsigned start_index, unsig
                frag_shader += replace_prefix(effects[i]->output_fragment_shader(), effect_id);
                frag_shader += "#undef PREFIX\n";
                frag_shader += "#undef FUNCNAME\n";
-               frag_shader += "#undef LAST_INPUT\n";
-               frag_shader += std::string("#define LAST_INPUT ") + effect_id + "\n";
+               frag_shader += "#undef INPUT\n";
+               frag_shader += std::string("#define INPUT ") + effect_id + "\n";
                frag_shader += "\n";
 
                input_needs_mipmaps |= effects[i]->needs_mipmaps();
index 0a742a331301b725104162a9b739c48a829b65f1..e41e83c093ac03be573069fd2a37595e87810fda 100644 (file)
@@ -1,4 +1,4 @@
 void main()
 {
-       gl_FragColor = LAST_INPUT(tc);
+       gl_FragColor = INPUT(tc);
 }
index e4629c6fe324ecc8b72d5067cd7d30151baae782..671f52b9427d8e672f1a10388b9016385310ecd8 100644 (file)
@@ -2,6 +2,6 @@ varying vec2 tc;
 
 void main()
 {
-       tc = LAST_INPUT();
+       tc = INPUT();
         gl_Position = ftransform();
 }
index 8944982f6ad19c20161bcd077811b50cb20c46a5..27e014e1182bc30d1b6a0abde0a3055c75e28bf1 100644 (file)
@@ -1,7 +1,7 @@
 // Compress to sRGB gamma curve.
 
 vec4 FUNCNAME(vec2 tc) {
-       vec4 x = LAST_INPUT(tc);
+       vec4 x = INPUT(tc);
 
        x.r = texture1D(PREFIX(compression_curve_tex), x.r).x;
        x.g = texture1D(PREFIX(compression_curve_tex), x.g).x;
index 4a5db9e178d53abbdc0c22a76a3c0c439baab564..1174a3e85cc85f20defcae93812df1da555e3ca4 100644 (file)
@@ -1,7 +1,7 @@
 // Expand sRGB gamma curve.
 
 vec4 FUNCNAME(vec2 tc) {
-       vec4 x = LAST_INPUT(tc);
+       vec4 x = INPUT(tc);
 
        x.r = texture1D(PREFIX(expansion_curve_tex), x.r).x;
        x.g = texture1D(PREFIX(expansion_curve_tex), x.g).x;
index 68d966b15fee434dce1a8f98c2b8d3ab60a9357f..539eb8d07cee1911000bef475240c384ebd75d5b 100644 (file)
@@ -6,4 +6,4 @@ vec4 read_input(vec2 tc)
        return texture2D(input_tex, tc.st);
 }
 
-#define LAST_INPUT read_input
+#define INPUT read_input
index 3ab870d97fa6fdcfdd8b7b98e0394c80efbdf8cf..d37809a3a9af7e01f2bfe1f42f23f7a5844e27d6 100644 (file)
@@ -3,4 +3,4 @@ vec2 read_input()
        return gl_MultiTexCoord0.st;
 }
 
-#define LAST_INPUT read_input
+#define INPUT read_input
index ca41262dd22bea72c7e578e6b4b75e00d7dca9ed..d9d7fc3b476ec87df56c35d3c88f8d72279f3154 100644 (file)
@@ -1,5 +1,5 @@
 // Identity transformation (sometimes useful to do nothing).
 vec4 FUNCNAME(vec2 tc)
 {
-       return LAST_INPUT(tc);
+       return INPUT(tc);
 }
index 43766a6265218621888cbf7a11ffe862ddb0fbba..acd9d5162ca34c219bfa555feb191c1ea5a2cbd8 100644 (file)
@@ -3,7 +3,7 @@ uniform vec3 PREFIX(gain_pow_inv_gamma);  // gain^(1/gamma).
 uniform vec3 PREFIX(inv_gamma_22);  // 2.2 / gamma.
 
 vec4 FUNCNAME(vec2 tc) {
-       vec4 x = LAST_INPUT(tc);
+       vec4 x = INPUT(tc);
 
        x.rgb = pow(x.rgb, vec3(1.0/2.2));
        x.rgb += PREFIX(lift) * (vec3(1) - x.rgb);
index 0d4206a79500a3efaac45ece56bada38518b2203..049194d63adbbb6d0d15040aabeb5dbc39b4b90e 100644 (file)
@@ -2,5 +2,5 @@
 vec4 FUNCNAME(vec2 tc)
 {
        tc.x = 1.0 - tc.x;
-       return LAST_INPUT(tc);
+       return INPUT(tc);
 }
index 30e03e44f59eeae9ed1cfec1d9d7158666a8617b..c40b4cdd3cccc700dc9318d8b71f2ae7dedf5c24 100644 (file)
@@ -1,5 +1,5 @@
 vec4 FUNCNAME(vec2 tc) {
        // Your code goes here, obviously.
        // You can use PREFIX(parm) to access the parameter you gave in.
-       return LAST_INPUT(tc);
+       return INPUT(tc);
 }
index a68485a85a74bc2860e7ca594301f6d03b893717..31106d36bfb4bcb529a57d19bdd0373e8fa39cf1 100644 (file)
@@ -1,7 +1,7 @@
 // Saturate/desaturate (in linear space).
 
 vec4 FUNCNAME(vec2 tc) {
-       vec4 x = LAST_INPUT(tc);
+       vec4 x = INPUT(tc);
 
        float luminance = dot(x.rgb, vec3(0.2126, 0.7152, 0.0722));
        x.rgb = mix(vec3(luminance), x.rgb, PREFIX(saturation));
index bc84516437685727301a7f512f0f9aba911cd724..422b27fd654b40d646ff13af5a2af566c834a524 100644 (file)
@@ -4,7 +4,7 @@ uniform float PREFIX(inv_radius);
 uniform vec2 PREFIX(aspect_correction);
 
 vec4 FUNCNAME(vec2 tc) {
-       vec4 x = LAST_INPUT(tc);
+       vec4 x = INPUT(tc);
 
        const float pihalf = 0.5 * 3.14159265358979324;