summaryrefslogtreecommitdiffstats
path: root/video/out/opengl/video_shaders.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2015-12-08 03:18:47 +0100
committerwm4 <wm4@nowhere>2015-12-08 03:18:47 +0100
commit0d7d935e8863ae759f284739769f250b1302a9ec (patch)
tree848efd98de35ec4cbbb6207ab5fbc8bc6280d369 /video/out/opengl/video_shaders.c
parent3d66a5d14eaa6081dd8b14dd8dd03cf996e4945e (diff)
downloadmpv-0d7d935e8863ae759f284739769f250b1302a9ec.tar.bz2
mpv-0d7d935e8863ae759f284739769f250b1302a9ec.tar.xz
vo_opengl: fix shader compilation regression
The recent LUT adjustment changes broke interpolation. The concatenation of the shader stages is a bit messy, and it seems like sampler_prelude is not a good place to add this macro. Always add the macro to every shader instead. (While this doesn't seem too elegant, this isn't too inelegant either, and goes these problems out of the way.)
Diffstat (limited to 'video/out/opengl/video_shaders.c')
-rw-r--r--video/out/opengl/video_shaders.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/video/out/opengl/video_shaders.c b/video/out/opengl/video_shaders.c
index e5b6f917d8..04e62d9304 100644
--- a/video/out/opengl/video_shaders.c
+++ b/video/out/opengl/video_shaders.c
@@ -38,10 +38,6 @@ void sampler_prelude(struct gl_shader_cache *sc, int tex_num)
GLSLF("vec2 pos = texcoord%d;\n", tex_num);
GLSLF("vec2 size = texture_size%d;\n", tex_num);
GLSLF("vec2 pt = vec2(1.0) / size;\n");
- GLSLF("#undef LUT_POS\n");
- // The variant of mix() with three floats as parameters is supported in
- // all GLSL versions.
- GLSLF("#define LUT_POS(x, lut_size) mix(0.5 / (lut_size), 1.0 - 0.5 / (lut_size), (x))\n");
}
static void pass_sample_separated_get_weights(struct gl_shader_cache *sc,