BLOKS Shader Bulletin Board
smooth audio response
Shader Preview Unavailable
This realtime shader may be too intensive for your current device or browser.
Shader Code
void mainImage(out vec4 fragColor, in vec2 fragCoord)
{
vec2 uv = fragCoord.xy / iResolution.xy;
vec2 p = uv * 2.0 - 1.0;
p.x *= iResolution.x / iResolution.y;
float raw = 0.5 + 0.5 * sin(iTime * 6.0);
float smoothAudio =
0.5 +
0.3 * sin(iTime * 2.0) +
0.2 * sin(iTime * 1.2);
float d = length(p);
float rawRing =
smoothstep(0.28 + raw * 0.12, 0.27, d);
float smoothRing =
smoothstep(0.55 + smoothAudio * 0.08, 0.54, d);
vec3 color = vec3(0.02, 0.04, 0.08);
color += rawRing * vec3(1.0, 0.15, 0.2);
color += smoothRing * vec3(0.1, 0.7, 1.0);
fragColor = vec4(color, 1.0);
}
