#version 410 core
uniform float fGlobalTime; // in seconds
uniform vec2 v2Resolution; // viewport resolution (in pixels)
uniform float fFrameTime; // duration of the last frame, in seconds
uniform sampler1D texFFT; // towards 0.0 is bass / lower freq, towards 1.0 is higher / treble freq
uniform sampler1D texFFTSmoothed; // this one has longer falloff and less harsh transients
uniform sampler1D texFFTIntegrated; // this is continually increasing
uniform sampler2D texPreviousFrame; // screenshot of the previous frame
uniform sampler2D texChecker;
uniform sampler2D texInercia;
uniform sampler2D texInerciaBW;
uniform sampler2D texNoise;
uniform sampler2D texTex1;
uniform sampler2D texTex2;
uniform sampler2D texTex3;
uniform sampler2D texTex4;
#define time (fGlobalTime / 3.)
#define r2d(p,a) p=cos(a)*p + sin(a)*vec2(-p.y,p.x);
layout(location = 0) out vec4 out_color; // out_color must be written in order to see anything
float f(vec3 p, float t) {
vec3 o = p;
p = fract(p) - .5;
float s = 3., l;
for (int i=0; i<8; i++) {
p = abs(p);
p = p.x