1
mirror of https://github.com/mpv-player/mpv synced 2024-12-24 07:33:46 +01:00

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.
This commit is contained in:
wm4 2013-05-31 21:28:13 +02:00
parent 07fc939544
commit 87c549ffae

View File

@ -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));