From 67bc585986289a2da9a5a013bc4645f2efdb3423 Mon Sep 17 00:00:00 2001 From: papadanku <115061077+papadanku@users.noreply.github.com> Date: Mon, 29 Jul 2024 23:26:00 -0700 Subject: [PATCH] Update cColor.fxh --- shaders/shared/cColor.fxh | 22 ---------------------- 1 file changed, 22 deletions(-) diff --git a/shaders/shared/cColor.fxh b/shaders/shared/cColor.fxh index bdcfdef..42f3fd1 100644 --- a/shaders/shared/cColor.fxh +++ b/shaders/shared/cColor.fxh @@ -79,28 +79,6 @@ return ((Color.br - Y) * float2(0.564, 0.713)) + 0.5; } - /* - RGB to saturation value. - --- - Golland, Polina, and Alfred M. Bruckstein. "Motion from color." - Computer Vision and Image Understanding 68, no. 3 (1997): 346-362. - --- - http://www.cs.technion.ac.il/users/wwwb/cgi-bin/tr-get.cgi/1995/CIS/CIS9513.pdf - */ - - float CColor_SaturateRGB(float3 Color) - { - // Calculate min and max RGB - float MinColor = min(min(Color.r, Color.g), Color.b); - float MaxColor = max(max(Color.r, Color.g), Color.b); - - // Calculate normalized RGB - float SatRGB = (MaxColor - MinColor) / MaxColor; - SatRGB = (MaxColor == 0.0) ? 0.0 : SatRGB; - - return SatRGB; - } - /* Color-space conversion ---