fraksl_wmatrix

GLSL shader by scry · created 2024-09-25 · updated 2026-06-23 · 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

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);}

Buffer A (iChannel0)

void mainImage(out vec4 fragColor, in vec2 fragCoord) {
   
    vec2 uv = fragCoord.xy / iResolution.xy;
    float ar = iResolution.x/iResolution.y;
    vec3 col = vec3(0.);
    //uv.x = abs(uv.x-0.5)+0.5;
    vec2 bv = uv;
    
    bv -= 0.5;
    bv *= mat2(u1,u2,u3,u4);
    //bv *= 1.+s*0.001;
    float aa = a*0.01;
    bv.x *= ar;
    bv *= mat2(cos(aa),sin(aa),-sin(aa),cos(aa));\
    
    bv.x *= 1./ar;
    //bv.x = abs(bv.x);
    bv += 0.5;
    bv.x -= x*0.01;
    bv.y -= y*0.01;
    bv = fract(bv/(s*0.1+2.))*(s*0.1+2.);
    vec3 bak = texture(iChannel0, bv).rgb;
    if ((bv.x > 0. && bv.x < 1.) && (bv.y > 0. && bv.y < 1.)) {
        col = 1.-bak;
        col = rgb2hsv(col);
        col.x += h*0.1;
        col.y = hs/20.;
        col = hsv2rgb(col);
    } else {
        col = hsv2rgb(vec3(h*0.1+0.1,hs/20.,1.));
    }
    if (iFrame < 1) {
        col *= 0.;
    }
    col = mix(col,bak,0.05);
    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