diff options
author | Niklas Haas <git@haasn.xyz> | 2019-01-03 01:39:23 +0100 |
---|---|---|
committer | Jan Ekström <jeebjp@gmail.com> | 2019-02-18 01:54:06 +0200 |
commit | 677ae4f8fe5c9896bc7b7b174e75400c15afc146 (patch) | |
tree | b9545db4c9e05bf2175945c2063bb527dadccc12 /video/out/gpu | |
parent | 11b58415d51e14760ffb0302d9c6d86a504a2b57 (diff) | |
download | mpv-677ae4f8fe5c9896bc7b7b174e75400c15afc146.tar.bz2 mpv-677ae4f8fe5c9896bc7b7b174e75400c15afc146.tar.xz |
vo_gpu: make --gamut-warning warn on negative colors
As is the case for actually out-of-gamut colors (rather than just too
bright colors).
Diffstat (limited to 'video/out/gpu')
-rw-r--r-- | video/out/gpu/video_shaders.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/video/out/gpu/video_shaders.c b/video/out/gpu/video_shaders.c index 3b6c9d01af..806f0e17dd 100644 --- a/video/out/gpu/video_shaders.c +++ b/video/out/gpu/video_shaders.c @@ -813,7 +813,8 @@ void pass_color_map(struct gl_shader_cache *sc, bool is_linear, // Warn for remaining out-of-gamut colors is enabled if (opts->gamut_warning) { - GLSL(if (any(greaterThan(color.rgb, vec3(1.01))))) + GLSL(if (any(greaterThan(color.rgb, vec3(1.01))) || + any(lessThan(color.rgb, vec3(0.0))))) GLSL(color.rgb = vec3(1.0) - color.rgb;) // invert } |