Project_2024-09-27_12-45-49_forked_forked_forked

GLSL shader by scry · created 2024-10-19 · 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)

Buffer A (iChannel0)

#define pi acos(-1.)
#define deg pi/180.
#define time iTime*pi/10. 
#define R iResolution.xy
#define ar R.x/R.y
vec3 cs = vec3(1.,2.,3.);
mat2 r2d(float a) {
    return mat2(cos(a),sin(a),-sin(a),cos(a));
}
vec3 rgb2hsv(vec3 c){vec4 K = vec4(0.0, -1.0 / 3.0, 2.0 / 3.0, -1.0);
vec4 p = mix(vec4(c.bg, K.wz), vec4(c.gb, K.xy), step(c.b, c.g));vec4
 q = mix(vec4(p.xyw, c.r), vec4(c.r, p.yzx), step(p.x, c.r)); float d
=  q.x - min(q.w, q.y);float e = 1.0e-10;return vec3(abs(q.z + (q.w -
 q.y) / (6.0 * d + e)), d / (q.x + e), q.x);}vec3 hsv2rgb( vec3 c ) {
 vec4 K = vec4( 1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0); vec3 p = abs( fract(
 c.xxx + K.xyz ) * 6.0 - K.www);  return c.z * mix( K.xxx, clamp( p -
K.xxx, 0.0, 1.0), c.y);}float bitm(vec2 uv,int c) {float h = 5.;float
 w = 3.;int p = int(pow(2.,w)); float line1 = 9591.; uv = floor(vec2(
 uv.x*w,uv.y*h))/vec2(w,w);float c1 = 0.;float cc = uv.x + uv.y*w; c1
=  mod( floor( float(c) / exp2(ceil(cc*w-0.6))) ,2.); c1 *= step( 0.,
uv.x)*step(0.,uv.y);c1 *= step(0.,(-uv.x+0.99))*step(0.,(-uv.y+1.6));
return (c1);}vec3 slogo(vec2 uv, float ar_, float size) {size = 240./
size;uv.x = 1.-uv.x;vec2 px = vec2(1./3.,1./5.); float ls = 4.1;uv *=
 240./5.25/size;ls += 2.;float ul = length(uv);ul = length(vec2(uv.x*
 0.5,uv.y)-0.5);uv -= 0.4;uv.x *= ar*1.75;uv.y *= 1.04;int s = 29671;
 int c = 29263;int r = 31469; int y = 23186; uv.x= 5.-uv.x; float b =
bitm(uv,s); uv.x -= 1./3.*4.; b += bitm( uv,c); uv.x -= 1./3.*4.;b +=
 bitm(uv,r);uv.x -= 1./3.*4.;b += bitm(uv,y);float rr = step(0.,uv.x+
 px.x*13.)*step(0.,uv.y+px.y)*step(0.,(-uv.x+px.x*4.))*step(0.,(-uv.y
 +px.y*6.));b = clamp(b,0.,1.);vec3 l = hsv2rgb(vec3(b+iTime/40.,0.1,
 rr-b*1.9))*rr;l -= 0.1-clamp(ul*0.1,rr*1.-b,0.1);return vec3(l);}
void mainImage(out vec4 fragColor, in vec2 fragCoord) {
        vec2 uv = fragCoord.xy / iResolution.xy;
        vec2 tv = uv;
        vec3 col = vec3(0.);
        //uv -= 0.1;''
        uv -= 0.5;
        float a = 1.;
        for (int i=0;i<12;i++) {
            uv = abs(uv)-4.*a;
            uv *= r2d(deg*-45.);
            a *= 0.75;
        }
        uv += 6.;
        //uv += time/4.;
        for (int i=0;i<42;i++) {
            uv += vec2(sin(uv.y*89.),cos(uv.x*49.+time*0.))*0.0035;
            //uv = uv/dot(uv.yx,uv);
            uv *= 1.+0.00001;
            //uv *= r2d(deg*45.);
            //uv *= r2d(deg*45.);
            //uv += 0.01;
            //uv *= r2d(deg*-45.);
            //uv.y += -0.01;
            uv *= r2d(deg*45.);
            uv += vec2(sin(time*10.),cos(time*10.))*0.0015;
            //uv *= 1.-0.02;
            //uv -= 0.005;
            //uv += 0.95;
            //uv = uv/dot(uv,uv);
            uv += 0.05;
            //uv = uv/dot(uv,uv);
            //uv += vec2(sin(uv.y*140.),cos(uv.x*140.))*0.002;
            //uv += 0.055;
            //col += sin(uv.x*pi*4.);
            //uv *= r2d(deg*-60.15);
            //uv -= 0.005;
        }
        //col = sin(col/14.+vec3(1.,2.,3.)+time*20.);
        col += sin(uv.x)*sin(uv.x*0.-4.+vec3(1.,2.,3.)/10.)+0.5;
        col += sin(uv.y*20.+time*10.+vec3(1.,2.,4.5)/4.)/4.-0.4;
        col += smoothstep(0.01,0.,sin(uv.y*40.+time*10.+vec3(1.,2.,4.5)/14.)/4.+0.24)/2.;
        col += smoothstep(0.02,0.,sin(uv.y*30.+time*10.+vec3(1.,2.,4.5)/24.)/4.+0.2)/2.;
        //col += smoothstep(0.1,0.,sin(uv.x)*sin(uv.x*0.-4.+vec3(1.,2.,3.)/10.)+0.3);
        //col += sin(uv.y*10.+time*10.+vec3(1.,2.,4.5)/4.)/4.;
        //col += sin(uv.y*7.+time*10.+vec3(1.,2.,3.))*0.6+0.4;
        col += slogo(tv,1.,300./1.)*(sin(vec3(0.6+tv.x*20.))*0.4+0.6)*0.9;
        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