From 53f7352347b4d8fb78598cf70ce6dd15be488a45 Mon Sep 17 00:00:00 2001 From: Smarthard Date: Tue, 11 Sep 2018 19:01:24 +0300 Subject: [PATCH] bars COLOR refactored & alpha channel support added --- shaders/bars.glsl | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/shaders/bars.glsl b/shaders/bars.glsl index c0ba8d8..737b48e 100644 --- a/shaders/bars.glsl +++ b/shaders/bars.glsl @@ -12,8 +12,14 @@ #define BAR_OUTLINE_WIDTH 0 /* Amplify magnitude of the results each bar displays */ #define AMPLIFY 300 +/* Alpha channel for Bars color */ +#define ALPHA 0.7 +/* How strong the gradient changes */ +#define GRADIENT_POWER 60 +/* Bar color changes with height */ +#define GRADIENT (d / GRADIENT_POWER + 1) /* Bar color */ -#define COLOR (#3366b2 * ((d / 60) + 1)) +#define COLOR (#3366b2 * GRADIENT * ALPHA) /* Direction that the bars are facing, 0 for inward, 1 for outward */ #define DIRECTION 0 /* Whether to switch left/right audio buffers */