From a638508dbebd2734a449d8b180a86eeeb0ed2da6 Mon Sep 17 00:00:00 2001 From: metallic77 <43163462+metallic77@users.noreply.github.com> Date: Sun, 18 Jun 2023 11:44:27 +0300 Subject: [PATCH] improve mono mode --- misc/shaders/simple_color_controls.slang | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/misc/shaders/simple_color_controls.slang b/misc/shaders/simple_color_controls.slang index b5d06e9..c80793f 100644 --- a/misc/shaders/simple_color_controls.slang +++ b/misc/shaders/simple_color_controls.slang @@ -109,7 +109,7 @@ mat4 contrastMatrix(float contr) vec3 toGrayscale(vec3 color) { - float average = (color.r + color.g + color.b) / 3.0; + float average = dot(vec3(0.22,0.71,0.07),color); return vec3(average); } @@ -150,4 +150,4 @@ void main() } FragColor = vec4(col,1.0); -} \ No newline at end of file +}