Merge pull request #571 from fishcu/fishcu/minor-fixes

Minor fixes to input transformation library and blur fill
This commit is contained in:
hizzlekizzle 2024-04-09 08:54:47 -05:00 committed by GitHub
commit d7e15b9c05
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 3 additions and 3 deletions

View file

@ -7,7 +7,7 @@
#pragma parameter OTHER_SETTINGS "= Other parameters =" 0.0 0.0 1.0 1.0
#pragma parameter EXTEND_H "Extend the fill horizontally" 0.0 0.0 1.0 1.0
#pragma parameter EXTEND_V "Extend the fill vertically" 1.0 0.0 1.0 1.0
#pragma parameter EXTEND_V "Extend the fill vertically" 0.0 0.0 1.0 1.0
#pragma parameter MIRROR_BLUR "Mirror the blur" 0.0 0.0 1.0 1.0

View file

@ -54,7 +54,7 @@ void main() {
vec2(param.ASPECT_H, param.ASPECT_V),
vec2(param.FORCE_INTEGER_SCALING_H, param.FORCE_INTEGER_SCALING_V), param.OVERSCALE,
/* output_size_is_final_viewport_size = */ true);
vec2 shift = vec2(param.SHIFT_H, param.SHIFT_V);
const vec2 shift = vec2(param.SHIFT_H, param.SHIFT_V);
tx_coord = o2i(vTexCoord, param.InputSize.xy, crop, shift, param.Rotation,
param.CENTER_AFTER_CROPPING, scale_o2i);
input_corners = get_input_corners(param.InputSize.xy, crop, param.Rotation);

View file

@ -143,7 +143,7 @@ vec2 get_scale_o2i(vec2 input_size, vec2 output_size, vec4 crop, uint rotation,
scale_x = floor(scale_x);
}
}
return output_size.xy / vec2(scale_x, scale_y);
return output_size / vec2(scale_x, scale_y);
}
// From unit output to pixel input space.