X-Git-Url: https://git.sesse.net/?p=movit;a=blobdiff_plain;f=slice_effect.frag;h=1598cb034565addd4289be93c4f119771ace62da;hp=84165154b3f01b7e795fee7dc9b14e0ea71dd005;hb=74ac64b2e402247edf61271a4862e657da7fe135;hpb=c34865f55569942959da2815a790b5ad76ba0057 diff --git a/slice_effect.frag b/slice_effect.frag index 8416515..1598cb0 100644 --- a/slice_effect.frag +++ b/slice_effect.frag @@ -6,7 +6,7 @@ vec4 FUNCNAME(vec2 tc) { // DIRECTION_VERTICAL will be #defined to 1 if we are expanding vertically, // and 0 otherwise. #if DIRECTION_VERTICAL - float sliced_coord = tc.y; + float sliced_coord = 1.0 - tc.y; #else float sliced_coord = tc.x; #endif @@ -19,7 +19,7 @@ vec4 FUNCNAME(vec2 tc) { float input_coord = slice_num * PREFIX(slice_num_to_input_coord) + slice_offset * PREFIX(slice_offset_to_input_coord); #if DIRECTION_VERTICAL - return INPUT(vec2(tc.x, input_coord)); + return INPUT(vec2(tc.x, 1.0 - input_coord)); #else return INPUT(vec2(input_coord, tc.y)); #endif