From 8cbf7bc579e889d627e864ee3da4e2c3ed8f1955 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Theo=20M=C3=BCller?= Date: Thu, 31 Jan 2019 12:05:05 +0100 Subject: [PATCH] Cubic interpolation for joining graph channels --- shaders/graph/1.frag | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shaders/graph/1.frag b/shaders/graph/1.frag index 04839d8..9b82d05 100644 --- a/shaders/graph/1.frag +++ b/shaders/graph/1.frag @@ -92,7 +92,7 @@ float get_line_height(in sampler1D tex, float idx) { float fact = clamp((abs((screen.x / 2) - gl_FragCoord.x) / screen.x) * 48, 0.0F, 1.0F); #if JOIN_CHANNELS > 0 - fact = pow(fact, 1.8); /* To avoid spikes */ + fact = -2 * pow(fact, 3) + 3 * pow(fact, 2); /* To avoid spikes */ s = fact * s + (1 - fact) * middle; #else s *= fact;