Updated shader configs
This commit is contained in:
2
render.h
2
render.h
@@ -8,7 +8,7 @@ typedef struct renderer {
|
||||
struct gl_data* gl;
|
||||
} renderer;
|
||||
|
||||
struct renderer* rd_new(const char** paths, const char* entry);
|
||||
struct renderer* rd_new(const char** paths, const char* entry, const char* force_mod);
|
||||
void rd_update(struct renderer*, float* lb, float* rb, size_t bsz, bool modified);
|
||||
void rd_destroy(struct renderer*);
|
||||
void rd_time(struct renderer*);
|
||||
|
||||
@@ -20,3 +20,13 @@
|
||||
#define COLOR vec4((0.3 + RCOL_OFF) + LSTEP, 0.6 - LSTEP, (0.3 + LCOL_OFF) + LSTEP, 1)
|
||||
/* outline color */
|
||||
#define OUTLINE vec4(0.15, 0.15, 0.15, 1)
|
||||
/* How many frames to queue and run through the average function */
|
||||
#request setavgframes 6
|
||||
/* Whether to window frames ran through the average function (new & old frames
|
||||
are weighted less). This massively helps smoothing out spikes in the animation */
|
||||
#request setavgwindow true
|
||||
/* Gravity step, higher values means faster drops. The step is applied in a rate
|
||||
independant method like so:
|
||||
|
||||
val -= (gravitystep) * (seconds per update) */
|
||||
#request setgravitystep 5.2
|
||||
|
||||
@@ -7,19 +7,6 @@ uniform ivec2 screen; /* screen dimensions */
|
||||
#request uniform "audio_sz" audio_sz
|
||||
uniform int audio_sz;
|
||||
|
||||
/* How many frames to queue and run through the average function */
|
||||
#request setavgframes 6
|
||||
|
||||
/* Whether to window frames ran through the average function (new & old frames
|
||||
are weighted less). This massively helps smoothing out spikes in the animation */
|
||||
#request setavgwindow true
|
||||
|
||||
/* Gravity step, higher values means faster drops. The step is applied in a rate
|
||||
independant method like so:
|
||||
|
||||
val -= (gravitystep) * (seconds per update) */
|
||||
#request setgravitystep 5.2
|
||||
|
||||
/* When we transform our audio, we need to go through the following steps:
|
||||
|
||||
transform -> "window"
|
||||
@@ -52,6 +39,8 @@ uniform int audio_sz;
|
||||
with 'setavgwindow'.
|
||||
*/
|
||||
|
||||
#include "../graph.glsl"
|
||||
|
||||
#request uniform "audio_l" audio_l
|
||||
#request transform audio_l "window"
|
||||
#request transform audio_l "fft"
|
||||
@@ -68,7 +57,6 @@ uniform sampler1D audio_r;
|
||||
|
||||
out vec4 fragment;
|
||||
|
||||
#include "../graph.glsl"
|
||||
#include "../util/smooth.glsl"
|
||||
|
||||
/* distance from center */
|
||||
|
||||
@@ -23,3 +23,13 @@
|
||||
#define INVERT 0
|
||||
/* Smoothing factor, in normalized width */
|
||||
#define SMOOTH 0.025
|
||||
/* How many frames to queue and run through the average function */
|
||||
#request setavgframes 6
|
||||
/* Whether to window frames ran through the average function (new & old frames
|
||||
are weighted less). This massively helps smoothing out spikes in the animation */
|
||||
#request setavgwindow true
|
||||
/* Gravity step, higher values means faster drops. The step is applied in a rate
|
||||
independant method like so:
|
||||
|
||||
val -= (gravitystep) * (seconds per update) */
|
||||
#request setgravitystep 5.2
|
||||
|
||||
@@ -6,19 +6,11 @@ uniform ivec2 screen;
|
||||
#request uniform "audio_sz" audio_sz
|
||||
uniform int audio_sz;
|
||||
|
||||
#request setavgframes 6
|
||||
|
||||
#request setavgwindow true
|
||||
|
||||
#request setgravitystep 5.2
|
||||
|
||||
#request setsmooth 0.0025
|
||||
#request setsmoothratio 1
|
||||
#include "../radial.glsl"
|
||||
|
||||
#request uniform "audio_l" audio_l
|
||||
#request transform audio_l "window"
|
||||
#request transform audio_l "fft"
|
||||
// #request transform audio_l "smooth"
|
||||
#request transform audio_l "gravity"
|
||||
#request transform audio_l "avg"
|
||||
uniform sampler1D audio_l;
|
||||
@@ -26,14 +18,11 @@ uniform sampler1D audio_l;
|
||||
#request uniform "audio_r" audio_r
|
||||
#request transform audio_r "window"
|
||||
#request transform audio_r "fft"
|
||||
// #request transform audio_r "smooth"
|
||||
#request transform audio_r "gravity"
|
||||
#request transform audio_r "avg"
|
||||
uniform sampler1D audio_r;
|
||||
|
||||
out vec4 fragment;
|
||||
|
||||
#include "../radial.glsl"
|
||||
#include "../util/smooth.glsl"
|
||||
|
||||
#define TWOPI 6.28318530718
|
||||
|
||||
Reference in New Issue
Block a user