diff options
author | Niklas Haas <git@nand.wakku.to> | 2014-11-26 19:35:37 +0100 |
---|---|---|
committer | Alessandro Ghedini <alessandro@ghedini.me> | 2014-12-01 21:07:12 +0100 |
commit | 3803c1427930fa4bfa8ce2572a5a231915e932be (patch) | |
tree | cc1d21fb58eee73960d723237c68b5d5637b362d | |
parent | 39126c382868abb8006474a3ff78f14ea94578b2 (diff) | |
download | mpv-3803c1427930fa4bfa8ce2572a5a231915e932be.tar.bz2 mpv-3803c1427930fa4bfa8ce2572a5a231915e932be.tar.xz |
vo_opengl: Reword comment in shader
I didn't quite understand this comment after looking at the code again
months later, so I reworded it for better clarity.
-rw-r--r-- | video/out/gl_video_shaders.glsl | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/video/out/gl_video_shaders.glsl b/video/out/gl_video_shaders.glsl index 11d2e94a61..bb6530295f 100644 --- a/video/out/gl_video_shaders.glsl +++ b/video/out/gl_video_shaders.glsl @@ -419,8 +419,9 @@ void main() { lessThanEqual(color.br, vec2(0))) + color.gg; #endif #ifdef USE_COLORMATRIX - // Clamp down here to avoid clipping CbCr details before CONST_LUMA - // has a chance to convert them. + // CONST_LUMA involves numbers outside the [0,1] range so we make sure + // to clip here, after the (possible) USE_CONST_LUMA calculations are done, + // instead of immediately after the colormatrix conversion. color = clamp(color, 0, 1); #endif // If we are scaling in linear light (SRGB or 3DLUT option enabled), we |