Project_2026-02-04_08-47-18

GLSL shader by scry · created 2026-02-04 · 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)

vec2 sdCircleWave(in vec2 p, in float tb, in float ra) {
    tb = 3.1415927*5.0/6.0*max(tb,0.0001);
    vec2 co = ra*vec2(sin(tb),cos(tb));
    vec2 ap = p;
    float pa = step(p.y,0.)*ra*2.;
    ap.x = mod(p.x+pa,co.x*4.)-co.x*2.;
    ap.y *= (step(-p.y,0.)-0.5);
    float y = atan(ap.x,ap.y);
    float ya = floor((p.x+pa)*co.x*11.1111);
    //y = y*.5+(ya*3.5+pa*-2.);
    y += (ya)*pi*2.-pa*pi*3.333;
    p.x = abs(mod(p.x,co.x*4.0)-co.x*2.0);
    vec2  p1 = p;
    vec2  p2 = vec2(abs(p.x-2.0*co.x),-p.y+2.0*co.y);
    float d1 = ((co.y*p1.x>co.x*p1.y) ? length(p1-co) : abs(length(p1)-ra));
    float d2 = ((co.y*p2.x>co.x*p2.y) ? length(p2-co) : abs(length(p2)-ra));
    float x = min(d1, d2);
    
    return vec2(x,y);
}
void mainImage(out vec4 fragColor, in vec2 fragCoord) {
    vec2 uv = fragCoord.xy / iResolution.xy;
    vec2 tv = uv;
    uv -= 0.5;
    uv.x *= ar;
    vec3 col = vec3(0.);
    vec2 ov = uv;
    uv *= 14.;
    //uv = uv/dot(uv,uv)*(0.15+sin(time)*0.1);
    //uv = mix(uv,ov*20.,sin(time+length(uv)*-1.)*0.5+0.5);
    //uv += sin(uv.yx*20.)*0.02;
    
    //uv = vec2(length(uv),atan(uv.x,uv.y)).yx;
    //uv *= 2.;
    //uv.y = log(uv.y)*1.;
    //uv.x = log(uv.x+ar/2.);
    //uv.x -= time/2.;
    //uv *= 0.05;
    //uv.x = fract(uv.x)*2.0945;
    //uv *= 3.;
    vec2 cv = uv;
    uv /= pi*3.;
    for (int i=0;i<4;i++) {
        uv = abs(uv)-0.2+sin(float(i)*pi/2.+time*0.25)*0.05;
        uv *= r2d(deg*45.);
    }
    uv.y += (sin(uv.x)*4.)*0.2;
    uv.y = fract(uv.y*1.7+time/pi/4.)/1.7;
    
    uv *= 8.;
    //uv *= r2d(time);
    float uf = floor(uv.y*1.7);
    float yc = mod(uf,2.)*0.3;
    //uv.x += sin(yc*pi/2.)*time;
   // uv.x += time;
    
    uv.x += sin(time*2.)*0.25;
    uv.x += yc*sin(time*2.);
    //uv.x += (1.-yc)*sin(time)*-0.5;
    uv.y = (fract(uv.y*1.7)-0.55)/1.7;
    vec2 w = sdCircleWave(uv,0.66,0.15);
    col += smoothstep(0.015,0.,w.x-0.01);
    //col += 0.15;
    
    //col -= w.y*0.2;
    //col *= sin(w.y*(1.+sin(yc*pi/2.+time+w.y*0.1)*0.5)+cs+time*4.)*0.5+0.5;
    col *= sin(w.y/9.+uf*pi/2.+cs+time*4.);
    col += smoothstep(0.01,0.,abs(w.x-0.1))*(sin(w.y+time*2.)*0.5+0.5);
    col += smoothstep(0.01,0.,abs(w.x-0.1)-0.02)*(sin(w.y*4.+cs-time*20.)*0.5+0.5)*0.09;
    //col += sin(w.x*140.)*0.2;
    col *= sin(w.y*0.5+uf*3.+time*4.);
    if (w.x > 0.1) {
        tv -= 0.5;
        tv *= 1.+sin(time+cv.y*10.)*0.01;
        tv += 0.5;
        col += texture(iChannel0,tv).rgb/1.3;
    }
    //col += sin(w.y*2.+cs)*0.5;
    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