diff options
author | wm4 <wm4@nowhere> | 2017-11-03 11:49:17 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2017-11-03 11:53:17 +0100 |
commit | 2abf20b2b2287150751c4e60f0eec818ade5fe73 (patch) | |
tree | 3fac1bd05539d18add35c19f9f917f28dc340301 /video/out | |
parent | aac74b7c367feba4329f475c4b4f22ea7c4679d9 (diff) | |
download | mpv-2abf20b2b2287150751c4e60f0eec818ade5fe73.tar.bz2 mpv-2abf20b2b2287150751c4e60f0eec818ade5fe73.tar.xz |
vo_gpu: fix mobius tone mapping compatibility to GLSL 120
Normally such code is didsabled by have_mglsl==false in
check_gl_features(), but apparently not this one.
Just fix it. Seems also more readable.
Fixes #5069.
Diffstat (limited to 'video/out')
-rw-r--r-- | video/out/gpu/video_shaders.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/video/out/gpu/video_shaders.c b/video/out/gpu/video_shaders.c index 7081a10fef..02f27b1bdb 100644 --- a/video/out/gpu/video_shaders.c +++ b/video/out/gpu/video_shaders.c @@ -627,7 +627,7 @@ static void pass_tone_map(struct gl_shader_cache *sc, float ref_peak, GLSLF("float b = (j*j - 2.0*j*sig_peak + sig_peak) / " "max(1e-6, sig_peak - 1.0);\n"); GLSLF("float scale = (b*b + 2.0*b*j + j*j) / (b-a);\n"); - GLSL(sig = mix(sig, scale * (sig + a) / (sig + b), sig > j);) + GLSL(sig = sig > j ? scale * (sig + a) / (sig + b) : sig;) break; case TONE_MAPPING_REINHARD: { |