From 677ae4f8fe5c9896bc7b7b174e75400c15afc146 Mon Sep 17 00:00:00 2001 From: Niklas Haas Date: Thu, 3 Jan 2019 01:39:23 +0100 Subject: 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). --- video/out/gpu/video_shaders.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 } -- cgit v1.2.3