65 if (j == 0)
return texture(spectrum0, f).r;
153 vec2 uv = (tc - 0.5) * vec2(aspect, 1.0);
155 float bass = texture(spectrum0, 0.03).r;
156 float mid = texture(spectrum0, 0.18).r;
157 float treble = texture(spectrum0, 0.52).r;
158 float air = texture(spectrum0, 0.86).r;
160 float histBass = 0.0;
162 float histTreble = 0.0;
164 for (
int i = 0; i < 8; ++i) {
170 histBass /= 8.0; histMid /= 8.0; histTreble /= 8.0; histAir /= 8.0;
174 vec3 live = texture(samp, tc +
styleDrift(uv, 0.0, 0.0, bass, mid, treble, air, oldest)).rgb;
177 float decay = mix(0.81, 0.94, clamp(
float(
SIZE - 8) / 24.0, 0.0, 1.0));
181 for (
int i = 0; i <
SIZE; ++i) {
182 float layer = float(i + 1);
183 float age = layer / float(
SIZE);
189 vec2 drift =
styleDrift(uv, layer, age, hB, hM, hT, hA, oldest);
191 cached =
styleColor(cached, layer, age, hB, hT);
193 float w = pow(decay, layer) * (1.0 + hT * 0.9 + hA * 0.3);
202 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.