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.
This commit is contained in:
wm4 2017-11-03 11:49:17 +01:00
parent aac74b7c36
commit 2abf20b2b2
1 changed files with 1 additions and 1 deletions

View File

@ -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) / " GLSLF("float b = (j*j - 2.0*j*sig_peak + sig_peak) / "
"max(1e-6, sig_peak - 1.0);\n"); "max(1e-6, sig_peak - 1.0);\n");
GLSLF("float scale = (b*b + 2.0*b*j + j*j) / (b-a);\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; break;
case TONE_MAPPING_REINHARD: { case TONE_MAPPING_REINHARD: {