summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2015-12-24 14:44:46 +0100
committerwm4 <wm4@nowhere>2015-12-24 14:44:46 +0100
commit082c23515f6e83381ff5220128fa4e3aecbb43d3 (patch)
tree0fa961a17da9abb660f53cdab6bc74432010eb59
parent6bec6ac55828495356e3498dc52294e28c38c3c1 (diff)
downloadmpv-082c23515f6e83381ff5220128fa4e3aecbb43d3.tar.bz2
mpv-082c23515f6e83381ff5220128fa4e3aecbb43d3.tar.xz
vo_opengl: fix operation on GLSL versions earlier than 1.30
GLSL below version 1.30 does not support mix() with a boolean interpolation value. Use ?: instead. Untested, but probably works.
-rw-r--r--video/out/opengl/video.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/video/out/opengl/video.c b/video/out/opengl/video.c
index 980867b8cc..6935f9a715 100644
--- a/video/out/opengl/video.c
+++ b/video/out/opengl/video.c
@@ -1537,7 +1537,7 @@ static void pass_convert_yuv(struct gl_video *p)
GLSL(color = vec4(color.rgb * color.a, 1.0);)
} else if (p->opts.alpha_mode == 3) { // blend against tiles
GLSL(bvec2 tile = lessThan(fract(gl_FragCoord.xy / 32.0), vec2(0.5));)
- GLSL(vec3 background = vec3(mix(0.75, 1.0, tile.x != tile.y));)
+ GLSL(vec3 background = vec3(tile.x == tile.y ? 1.0 : 0.75);)
GLSL(color.rgb = color.rgb * color.a + background * (1.0 - color.a);)
} else if (p->gl->fb_premultiplied) {
GLSL(color = vec4(color.rgb * color.a, color.a);)