From 87c549ffaecb675991c9aed5358466a62e151a83 Mon Sep 17 00:00:00 2001 From: wm4 Date: Fri, 31 May 2013 21:28:13 +0200 Subject: [PATCH] gl_video: explicitly clamp colormatrix output This could lead to quite visible artifacts when using an appropriate ICC and float FBOs. The float FBOs allow storing out of range values, and my guess is that the rest of the precessing chain elevated these out of range values, resulting in artifacts. --- video/out/gl_video_shaders.glsl | 1 + 1 file changed, 1 insertion(+) diff --git a/video/out/gl_video_shaders.glsl b/video/out/gl_video_shaders.glsl index 53524e6cbb..47be240571 100644 --- a/video/out/gl_video_shaders.glsl +++ b/video/out/gl_video_shaders.glsl @@ -358,6 +358,7 @@ void main() { #endif #ifdef USE_COLORMATRIX color = mat3(colormatrix) * color + colormatrix[3]; + color = clamp(color, 0, 1); #endif #ifdef USE_CONV_GAMMA color = pow(color, vec3(conv_gamma));