#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 texLogo;
uniform sampler2D texLogoBW;
uniform sampler2D texNoise;
uniform sampler2D texTex1;
uniform sampler2D texTex2;
uniform sampler2D texTex3;
uniform sampler2D texTex4;
uniform float fMidiKnob;
layout(location = 0) out vec4 out_color; // out_color must be written in order to see anything
#define INF (1./0.)
#define mr(t) (mat2(cos(t), sin(t), -sin(t), cos(t)))
#define time fGlobalTime
#define beat (time/60.*130.)
float hash(float t) {return fract(sin(t)*45562.5648);}
float box(vec3 p,vec3 s) {
p = abs(p)-s;
return max(p.x, max(p.y,p.z));
}
vec3 ct(vec3 p) {
if(p.x