From 3803c1427930fa4bfa8ce2572a5a231915e932be Mon Sep 17 00:00:00 2001 From: Niklas Haas Date: Wed, 26 Nov 2014 19:35:37 +0100 Subject: 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. --- video/out/gl_video_shaders.glsl | 5 +++-- 1 file 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 -- cgit v1.2.3