diff options
author | wm4 <wm4@nowhere> | 2013-05-31 21:28:13 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2013-06-03 00:00:14 +0200 |
commit | 87c549ffaecb675991c9aed5358466a62e151a83 (patch) | |
tree | 75e229b4eeed286dc5f761cf588785ca00a9d110 /video | |
parent | 07fc9395445b9fcb37e90de1c8ca2d5c93aaca3b (diff) | |
download | mpv-87c549ffaecb675991c9aed5358466a62e151a83.tar.bz2 mpv-87c549ffaecb675991c9aed5358466a62e151a83.tar.xz |
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.
Diffstat (limited to 'video')
-rw-r--r-- | video/out/gl_video_shaders.glsl | 1 |
1 files changed, 1 insertions, 0 deletions
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)); |