From 57c31f41301febe6a7b58833c164f090886a5b95 Mon Sep 17 00:00:00 2001 From: wm4 Date: Thu, 18 Feb 2016 10:42:26 +0100 Subject: vo_opengl: don't use normalized coords for debanding rectangle textures Fixes #2831. --- video/out/opengl/video_shaders.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/video/out/opengl/video_shaders.c b/video/out/opengl/video_shaders.c index a0833648fa..bafdd49443 100644 --- a/video/out/opengl/video_shaders.c +++ b/video/out/opengl/video_shaders.c @@ -366,7 +366,8 @@ void pass_sample_deband(struct gl_shader_cache *sc, struct deband_opts *opts, GLSLH(float dist = rand(h) * range; h = permute(h);) GLSLH(float dir = rand(h) * 6.2831853; h = permute(h);) - GLSLHF("vec2 pt = dist / vec2(%f, %f);\n", img_w, img_h); + bool r = tex_target == GL_TEXTURE_RECTANGLE; + GLSLHF("vec2 pt = dist / vec2(%f, %f);\n", r ? 1 : img_w, r ? 1 : img_h); GLSLH(vec2 o = vec2(cos(dir), sin(dir));) // Sample at quarter-turn intervals around the source pixel -- cgit v1.2.3