Unbreak some effects that were broken by 0c821b2e.
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Thu, 24 Dec 2015 21:31:47 +0000 (22:31 +0100)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Thu, 24 Dec 2015 21:36:58 +0000 (22:36 +0100)
luma_mix_effect.cpp
luma_mix_effect.frag
slice_effect.cpp
slice_effect.frag

index 6d5af73..e8c70a7 100644 (file)
@@ -12,7 +12,7 @@ LumaMixEffect::LumaMixEffect()
        register_float("transition_width", &transition_width);
        register_float("progress", &progress);
        register_int("inverse", &inverse);
-       register_uniform_bool("inverse", &uniform_inverse);
+       register_uniform_bool("bool_inverse", &uniform_inverse);
        register_uniform_float("progress_mul_w_plus_one", &uniform_progress_mul_w_plus_one);
 }
 
index e721a88..84af47c 100644 (file)
@@ -1,6 +1,6 @@
 // Implicit uniforms:
 // uniform float PREFIX(progress_mul_w_plus_one);
-// uniform bool PREFIX(inverse);
+// uniform bool PREFIX(bool_inverse);
 
 vec4 FUNCNAME(vec2 tc) {
        vec4 first = INPUT1(tc);
@@ -39,7 +39,7 @@ vec4 FUNCNAME(vec2 tc) {
        // just stay a simple mapping.
        float w = PREFIX(transition_width);
        float luma = INPUT3(tc).x;
-       if (PREFIX(inverse)) {
+       if (PREFIX(bool_inverse)) {
                luma = 1.0 - luma;
        }
        float m = clamp((luma * w - w) + PREFIX(progress_mul_w_plus_one), 0.0, 1.0);
index 66fed51..1634605 100644 (file)
@@ -22,7 +22,7 @@ SliceEffect::SliceEffect()
        register_uniform_float("output_coord_to_slice_num", &uniform_output_coord_to_slice_num);
        register_uniform_float("slice_num_to_input_coord", &uniform_slice_num_to_input_coord);
        register_uniform_float("slice_offset_to_input_coord", &uniform_slice_offset_to_input_coord);
-       register_uniform_float("offset", &uniform_offset);
+       register_uniform_float("normalized_offset", &uniform_offset);
 }
 
 string SliceEffect::output_fragment_shader()
index e9c2c37..c6b3619 100644 (file)
@@ -2,7 +2,7 @@
 // uniform float PREFIX(output_coord_to_slice_num);
 // uniform float PREFIX(slice_num_to_input_coord);
 // uniform float PREFIX(slice_offset_to_input_coord);
-// uniform float PREFIX(offset);
+// uniform float PREFIX(normalized_offset);
  
 vec4 FUNCNAME(vec2 tc) {
        // DIRECTION_VERTICAL will be #defined to 1 if we are expanding vertically,
@@ -18,7 +18,7 @@ vec4 FUNCNAME(vec2 tc) {
        float slice_offset = fract(sliced_coord * PREFIX(output_coord_to_slice_num));
 
        // Find out where this slice begins in the input data, and then offset from that.
-       float input_coord = slice_num * PREFIX(slice_num_to_input_coord) + slice_offset * PREFIX(slice_offset_to_input_coord) + PREFIX(offset);
+       float input_coord = slice_num * PREFIX(slice_num_to_input_coord) + slice_offset * PREFIX(slice_offset_to_input_coord) + PREFIX(normalized_offset);
 
 #if DIRECTION_VERTICAL
        return INPUT(vec2(tc.x, 1.0 - input_coord));