Project_2026-04-09_15-38-40

GLSL shader by scry · created 2026-04-09 · updated 2026-04-10 · 45s 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/180. //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
#define MBLUR_SAMPLES 20 // 1 = no blur, higher = smoother motion blur
#define FRAME_DT (1.*pi/10./20.) // time step assuming 60fps, matches time macro period
vec3 cs = vec3(1.,2.,3.);
mat2 r2d(float a) {
    return mat2(cos(a),sin(a),-sin(a),cos(a));
}

Buffer A (iChannel0)

float di(vec2 uv) {
    float d = smoothstep(4.,0.,abs(uv.x));
    return pow(log(abs(uv.x))*0.1,2.);
}
float channel(vec2 uv, vec2 ad, float scale, float t) {
    //uv.x += 0.5;
    for (int i=0;i<20;i++) {
        //uv = uv/dot(uv,uv);
        //uv *= r2d(t*0.1+float(i+0)*pi/10.);
        uv.y += di(sin(uv)/1000.)*scale*12.;
        uv.x += 1.5*sin(float(i)*pi/4.);
        //uv.y -= di(uv/1000.)*scale*3.;
        //uv.x += 0.4;
        uv *= r2d(deg*45.+float(i)*pi/3.);
        //uv.x  -= 0.3*float(i+1);
        //uv *= r2d(deg*180.);
        //uv = abs(uv)-0.1;
        uv += sin(time+vec2(0.,1.57))*01.2;
        //uv.x  += 0.1;
        //uv = uv/dot(uv,uv);
        //uv.y += di(uv/1000.)*scale*2.;
        //uv.x = abs(uv.x)-0.4*float(i+1)*0.05;
        //uv.x = abs(uv.x)-(iTime*0.04-0.1)+sin(t*0.1+float(i)*0.01)*0.1;
        //uv *= r2d(deg*-45.);
        if (mod(float(i),2.) == 0.) {
            //uv *= r2d((1./(t+1.))*8.+deg*180.);
        }
    }
    //uv *= r2d(time*20.);
    float f = smoothstep(0.5, 0., abs(fract(uv.y * 1.00)-0.5));
    //float f = uv.y;
    return f;
    //return f+sin(uv.x*400.)*0.1;
}
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.);
    uv *= 1.5;
    for (int i=0;i<0;i++) {
        //uv = abs(uv)-0.1*sin(float(i)*pi/6.5+1.425);
        //uv *= r2d(deg*45.);
    }
    float totalWeight = 0.0;
    //uv *= 1.-(1./(iTime*0.005+1.));
    uv *= r2d(time*0.1);
    uv *= 0.9;
    uv *= r2d(-time/10.+deg*0.);
    uv = uv/dot(uv,uv)*1.;
    //uv.x = abs(uv.x);
    uv = uv/dot(uv,uv)*10.;
    float n = 0.000005+time*0.00001;
    n = 0.0001;
    for (int s = 0; s < MBLUR_SAMPLES; s++) {
        //uv = abs(uv)-0.002;
        //uv *= 1.01;
        float frac = float(s) / float(MBLUR_SAMPLES);
        float t = time - FRAME_DT * (1.0 - frac)+0.27;
        // Fade: newest sample (s=MBLUR_SAMPLES-1) is brightest, oldest (s=0) is dimmest
        float w = float(s + 1) / float(MBLUR_SAMPLES);
        vec2 ad = sin(vec2(0.,1.57)+t);
        vec3 sample_col;
        sample_col.x = channel(uv, ad, 0.1, t);
        sample_col.y = channel(uv, ad, 0.1+n, t);
        sample_col.z = channel(uv, ad, 0.1+n*2., t);
        col += sample_col * w;
        col += sin(sample_col*14.5+1.+cs*0.8+time*8.+uv.x/2.)*0.3;
        totalWeight += w;
    }
    col /= totalWeight;
    //col = sin(col*25.+cs+time*4.)*0.3+col*0.6;
    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