summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2016-02-18 10:42:26 +0100
committerwm4 <wm4@nowhere>2016-02-18 10:42:26 +0100
commit57c31f41301febe6a7b58833c164f090886a5b95 (patch)
tree32485ef3797a82c56e3d0009324ef53f13d5785b
parentd6af58c699dad489fa19337cd91d8c3b78350d5f (diff)
downloadmpv-57c31f41301febe6a7b58833c164f090886a5b95.tar.bz2
mpv-57c31f41301febe6a7b58833c164f090886a5b95.tar.xz
vo_opengl: don't use normalized coords for debanding rectangle textures
Fixes #2831.
-rw-r--r--video/out/opengl/video_shaders.c3
1 files changed, 2 insertions, 1 deletions
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