Added cfg paths

This commit is contained in:
Jarcode
2017-12-09 12:05:26 -08:00
parent be68dd931a
commit 49f4ce735b
10 changed files with 42 additions and 16 deletions

View File

@@ -15,11 +15,13 @@
/* left color offset */
#define LCOL_OFF ((screen.x - gl_FragCoord.x) / 3000)
/* vertical color step */
#define LSTEP (gl_FragCoord.y / 170)
#define LSTEP (pos / 170)
/* actual color definition */
#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)
/* 1 to invert (vertically), 0 otherwise */
#define INVERT 0
/* 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

View File

@@ -39,7 +39,7 @@ uniform int audio_sz;
with 'setavgwindow'.
*/
#include "../graph.glsl"
#include ":graph.glsl"
#request uniform "audio_l" audio_l
#request transform audio_l "window"
@@ -57,7 +57,7 @@ uniform sampler1D audio_r;
out vec4 fragment;
#include "../util/smooth.glsl"
#include ":util/smooth.glsl"
/* distance from center */
#define CDIST (abs((screen.x / 2) - gl_FragCoord.x) / screen.x)
@@ -95,7 +95,12 @@ void render_side(in sampler1D tex, float idx) {
s *= 1 + BDIST;
/* and finally set fragment color if we are in range */
if (gl_FragCoord.y + 1.5 <= s) {
#if INVERT > 0
float pos = float(screen.y) - gl_FragCoord.y;
#else
float pos = gl_FragCoord.y;
#endif
if (pos + 1.5 <= s) {
fragment = COLOR;
} else {
fragment = vec4(0, 0, 0, 0);

View File

@@ -8,7 +8,7 @@ uniform ivec2 screen; /* screen dimensions */
out vec4 fragment; /* output */
#include "../graph.glsl"
#include ":graph.glsl"
void main() {
fragment = texture(tex, vec2(gl_FragCoord.x / screen.x, gl_FragCoord.y / screen.y));
@@ -26,7 +26,12 @@ void main() {
vec4 avg = (a0 + a1 + a2 + a3 + a4 + a5 + a6 + a7) / 8.0;
if (avg.a > 0){
if (fragment.a <= 0 && gl_FragCoord.y != screen.y - 1) {
#if INVERT > 0
#define EDGE_CHECK (gl_FragCoord.y != 0)
#else
#define EDGE_CHECK (gl_FragCoord.y != screen.y - 1)
#endif
if (fragment.a <= 0 && EDGE_CHECK) {
/* outline */
fragment = OUTLINE;
} else if (avg.a < 1 && gl_FragCoord.y != 0) {

View File

@@ -6,7 +6,7 @@ uniform ivec2 screen;
#request uniform "audio_sz" audio_sz
uniform int audio_sz;
#include "../radial.glsl"
#include ":radial.glsl"
#request uniform "audio_l" audio_l
#request transform audio_l "window"
@@ -23,7 +23,7 @@ uniform sampler1D audio_l;
uniform sampler1D audio_r;
out vec4 fragment;
#include "../util/smooth.glsl"
#include ":util/smooth.glsl"
#define TWOPI 6.28318530718
#define PI 3.14159265359

View File

@@ -10,7 +10,7 @@
#define PI 3.14159265359
#endif
#include "../smooth_parameters.glsl"
#include ":smooth_parameters.glsl"
/* window value t that resides in range [0, sz)*/
#define window(t, sz) (0.53836 - (0.46164 * cos(TWOPI * t / (sz - 1))))

View File

@@ -11,7 +11,7 @@ uniform sampler1D audio_l;
out vec4 fragment;
#include "../wave.glsl"
#include ":wave.glsl"
#define index(offset) ((texture(audio_l, (gl_FragCoord.x + offset) / screen.x).r - 0.5) * AMPLIFY) + 0.5F

View File

@@ -8,7 +8,7 @@ uniform ivec2 screen; /* screen dimensions */
out vec4 fragment; /* output */
#include "../wave.glsl"
#include ":wave.glsl"
void main() {
fragment = texture(tex, vec2(gl_FragCoord.x / screen.x, gl_FragCoord.y / screen.y));