Project_2026-01-23_23-41-19

GLSL shader by scry · created 2026-01-24 · 10s loop · 2 passes

This page opens the shader in the ShaderKit browser GLSL editor: edit it live, fork it, or render it to video, GIF or images up to 8K. Also available as a full-screen view and an embeddable player.

Shader source (GLSL)

Common

#define pi acos(-1.)
#define deg pi/180.  //1 degree
#define time iTime*2.*pi/10. //sin(time) loops 10 seconds
#define R iResolution.xy //shorthand
#define ar R.x/R.y //aspect ratio
#define M iMouse //shorthand
#define xm (M.xy/R) //normalized mouse
#define nm ((xm.xy-0.5)*vec2(ar,1.)+0.5) //aspect ratio correction
vec3 cs = vec3(1.,2.,3.);
mat2 r2d(float a) {
    return mat2(cos(a),sin(a),-sin(a),cos(a));
}

Buffer A (iChannel0)

vec3 spiral(vec2 uv, float density, float thickness, float hueSpeed, float startRadius, float endRadius, float fadeDist) {
    float angle = atan(uv.y, uv.x);
    float radius = length(uv);
    
    float spiralPattern = angle + radius * density - time*1.002;
    float line = smoothstep(0.00, thickness, abs(fract(spiralPattern / (2.0 * pi)) - 0.5) - 0.44);
    
    float hue = fract(angle / (2.0 * pi) + 1. * hueSpeed);
    vec3 rainbow = 0.6 + 0.5 * cos(2.0 * pi * (hue + vec3(0.0, 0.33, 0.67)));
    
    return rainbow * line * smoothstep(startRadius, startRadius + fadeDist, radius) * smoothstep(endRadius, endRadius - fadeDist, radius);
}

void mainImage(out vec4 fragColor, in vec2 fragCoord) {
    vec2 uv = fragCoord.xy / iResolution.xy;
    uv -= 0.5;
    uv.x *= ar;
    
    vec3 col = vec3(0.);
    int s = 24;
    float fs = float(s);
    for (int i=0;i<s;i++) {
        float ii = float(i);
        float ai = ii*pi/(fs/2.);
        vec2 av = uv+vec2(sin(ai),cos(ai))*0.2;
        
        float si = ii*(1./fs);
        //si = 0.;
        float st = time*0.15909+si;
        for (int j=0;j<1;j++) {
            //av = abs(av)-fract(time)*0.1;
        }
        col += spiral(av, 100.0, 0.06, time*0.16+si, -0.09+fract(st)*2., 0.+fract(st)*2., 0.02);
    
        //uv = abs(uv)-0.5;
    }
    col *= 1.;
    
    fragColor = vec4(col, 1.0);
}

Image

Not used

More shaders by scry

Browse all public shaders · All shaders by scry · ShaderKit home

Vibe Mode BETA
💰 ~0 credits
Uniforms
FPS: 0
Time: 0
Resolution: 0 x 0

Account

FPS: -- Time: -- --×-- 1x