diff options
author | Niklas Haas <git@haasn.xyz> | 2017-07-07 13:45:25 +0200 |
---|---|---|
committer | Niklas Haas <git@haasn.xyz> | 2017-07-07 13:47:47 +0200 |
commit | 9a49a3545346823157d9eaaf2c185dd3902d6f22 (patch) | |
tree | c4cc5fa7251302ccf37c8298a2d952fa36dc9687 /video | |
parent | ae4c0134ed65d576ddfcada94143b3f0302029ae (diff) | |
download | mpv-9a49a3545346823157d9eaaf2c185dd3902d6f22.tar.bz2 mpv-9a49a3545346823157d9eaaf2c185dd3902d6f22.tar.xz |
vo_opengl: correct off-by-one in scale=oversample
This caused a single pixel shift to the top-left, introduced in e3e03d0f3.
Diffstat (limited to 'video')
-rw-r--r-- | video/out/opengl/video_shaders.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/video/out/opengl/video_shaders.c b/video/out/opengl/video_shaders.c index 5795a36985..d343111389 100644 --- a/video/out/opengl/video_shaders.c +++ b/video/out/opengl/video_shaders.c @@ -251,7 +251,7 @@ void pass_sample_oversample(struct gl_shader_cache *sc, struct scaler *scaler, int w, int h) { GLSLF("{\n"); - GLSL(vec2 pos = pos + vec2(0.5) * pt;) // round to nearest + GLSL(vec2 pos = pos - vec2(0.5) * pt;) // round to nearest GLSL(vec2 fcoord = fract(pos * size - vec2(0.5));) // Determine the mixing coefficient vector gl_sc_uniform_vec2(sc, "output_size", (float[2]){w, h}); |