Crop out padding on preview processing (MR 13)

This commit is contained in:
Yassine Oudjana
2022-02-24 12:40:13 +04:00
committed by Martijn Braam
parent f107a2ff3f
commit 81859e54e7
3 changed files with 21 additions and 5 deletions

View File

@@ -6,6 +6,7 @@ uniform sampler2D texture;
uniform mat3 color_matrix;
#ifdef BITS_10
uniform float row_length;
uniform float padding_ratio;
#endif
varying vec2 top_left_uv;
@@ -22,6 +23,9 @@ skip_5th_pixel(vec2 uv)
new_uv.x *= 0.8;
new_uv.x += floor(uv.x * row_length / 5.0) / row_length;
// Crop out padding
new_uv.x *= padding_ratio;
return new_uv;
}
#endif