65 if (j == 0)
return texture(spectrum0, f).r;
149 vec2 uv = (tc - 0.5) * vec2(aspect, 1.0);
151 float bass = texture(spectrum0, 0.03).r;
152 float mid = texture(spectrum0, 0.18).r;
153 float treble = texture(spectrum0, 0.52).r;
154 float air = texture(spectrum0, 0.86).r;
156 float histBass = 0.0;
158 float histTreble = 0.0;
160 for (
int i = 0; i < 8; ++i) {
166 histBass /= 8.0; histMid /= 8.0; histTreble /= 8.0; histAir /= 8.0;
170 vec3 live = texture(samp, tc +
styleDrift(uv, 0.0, 0.0, bass, mid, treble, air, oldest)).rgb;
173 float decay = mix(0.81, 0.94, clamp(
float(
SIZE - 8) / 24.0, 0.0, 1.0));
177 for (
int i = 0; i <
SIZE; ++i) {
178 float layer = float(i + 1);
179 float age = layer / float(
SIZE);
185 vec2 drift =
styleDrift(uv, layer, age, hB, hM, hT, hA, oldest);
187 cached =
styleColor(cached, layer, age, hB, hT);
189 float w = pow(decay, layer) * (1.0 + hT * 0.9 + hA * 0.3);
198 color = vec4(clamp(accum, 0.0, 1.0), 1.0);
vec2 styleDrift(vec2 uv, float layer, float age, float hB, float hM, float hT, float hA, vec3 oldest)
Evaluates styleDrift for this shader effect.
float hash12(vec2 p)
Evaluates hash12 for this shader effect.
vec3 styleColor(vec3 cached, float layer, float age, float hB, float hT)
Evaluates styleColor for this shader effect.