From 082c23515f6e83381ff5220128fa4e3aecbb43d3 Mon Sep 17 00:00:00 2001 From: wm4 Date: Thu, 24 Dec 2015 14:44:46 +0100 Subject: 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. --- video/out/opengl/video.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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);) -- cgit v1.2.3