Fixed invert default behaviour for radial, closes #111
This commit is contained in:
@@ -19,7 +19,7 @@
|
||||
#define COLOR (#cc3333 * ((d / 40) + 1))
|
||||
/* Angle (in radians) for how much to rotate the visualizer */
|
||||
#define ROTATE (PI / 2)
|
||||
/* Whether to switch left/right audio buffers */
|
||||
/* Whether to swap left/right audio buffers, set to 1 to enable */
|
||||
#define INVERT 0
|
||||
/* Aliasing factors. Higher values mean more defined and jagged lines.
|
||||
Note: aliasing does not have a notable impact on performance, but requires
|
||||
|
||||
@@ -64,7 +64,7 @@ void main() {
|
||||
float dir = mod(abs(idx), TWOPI); /* absolute position, [0, 2pi) */
|
||||
if (dir > PI)
|
||||
idx = -sign(idx) * (TWOPI - dir); /* Re-correct position values to [-pi, pi) */
|
||||
if (INVERT > 0)
|
||||
#if INVERT == 0
|
||||
idx = -idx; /* Invert if needed */
|
||||
float pos = int(abs(idx) / section) / float(NBARS / 2); /* bar position, [0, 1) */
|
||||
#define smooth_f(tex) smooth_audio(tex, audio_sz, pos) /* smooth function format */
|
||||
|
||||
Reference in New Issue
Block a user