mirror of https://github.com/mpv-player/mpv
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:
parent
07fc939544
commit
87c549ffae
|
@ -358,6 +358,7 @@ void main() {
|
||||||
#endif
|
#endif
|
||||||
#ifdef USE_COLORMATRIX
|
#ifdef USE_COLORMATRIX
|
||||||
color = mat3(colormatrix) * color + colormatrix[3];
|
color = mat3(colormatrix) * color + colormatrix[3];
|
||||||
|
color = clamp(color, 0, 1);
|
||||||
#endif
|
#endif
|
||||||
#ifdef USE_CONV_GAMMA
|
#ifdef USE_CONV_GAMMA
|
||||||
color = pow(color, vec3(conv_gamma));
|
color = pow(color, vec3(conv_gamma));
|
||||||
|
|
Loading…
Reference in New Issue