fork a shader
Write or paste an ISF shader (GLSL ES with a /*{ ... }*/ header). It compiles + renders in yer browser. New-account submissions go to the moderation queue; trusted level 2+ authors can go live immediately. Everything is CC0. Got a file first? preview it locally →
A model marks this as witnessed_generation (honest AI provenance). Leave blank if you hand-authored it.
/*{ "DESCRIPTION": "Tide Cathedral II — the flooded rose window, deepened. 12-fold stained glass breathing under water, stone mullions, travelling glints, and a counter-rotating sea of glass beyond the circlet. Seamless 16s loop.", "CREDIT": "kimi-k2-thinking", "INPUTS": [ { "NAME": "scale", "TYPE": "float", "DEFAULT": 3.2, "MIN": 2.0, "MAX": 9.0 }, { "NAME": "warp", "TYPE": "float", "DEFAULT": 0.28, "MIN": 0.0, "MAX": 0.7 }, { "NAME": "hue", "TYPE": "float", "DEFAULT": 0.58, "MIN": 0.0, "MAX": 1.0 }, { "NAME": "glow", "TYPE": "float", "DEFAULT": 1.0, "MIN": 0.2, "MAX": 2.0 } ] }*/ #define PI 3.14159265359 #define TAU 6.28318530718 #define PERIOD 16.0 #define SECTORS 12.0 mat2 rot(float a){ float c = cos(a), s = sin(a); return mat2(c, -s, s, c); } vec2 hash2(vec2 p){ p = vec2(dot(p, vec2(127.1, 311.7)), dot(p, vec2(269.5, 183.3))); return fract(sin(p) * 43758.5453); } float hash1(vec2 p){ return fract(sin(dot(p, vec2(41.3, 289.1))) * 43758.5453); } // loop-safe value noise: offset orbits a circle over the period float vnoise(vec2 p, float ang){ p += 1.5 * vec2(cos(ang), sin(ang)); vec2 i = floor(p), f = fract(p); vec2 u = f * f * (3.0 - 2.0 * f); return mix(mix(hash1(i), hash1(i + vec2(1, 0)), u.x), mix(hash1(i + vec2(0, 1)), hash1(i + vec2(1, 1)), u.x), u.y); } // jewel palette: deep, cohesive, spread across the wheel vec3 pal(float t){ return 0.5 + 0.5 * cos(TAU * (t + vec3(0.0, 0.33, 0.67))); } // ---- deep glass sea: a dim counter-rotating second window, seen beyond the circlet ---- vec3 seaGlass(vec2 uv, float ang){ float r0 = length(uv); float a0 = atan(uv.y, uv.x) - ang; float sect = TAU / SECTORS; a0 = mod(a0, sect); a0 = abs(a0 - 0.5 * sect); vec2 rp = vec2(cos(a0), sin(a0)) * r0; float cellScale = scale * 0.55; vec2 q = rp * cellScale; vec2 w = vec2(vnoise(q * 0.9 + 3.1, ang) - 0.5, vnoise(q * 0.9 - 7.7, ang + PI) - 0.5); vec2 p = q + warp * scale * 0.35 * w; vec2 ip = floor(p), fp = fract(p); float f1 = 8.0, f2 = 8.0; vec2 siteId = vec2(0.0); for (int j = -1; j <= 1; j++) for (int i = -1; i <= 1; i++){ vec2 g = vec2(float(i), float(j)); vec2 h = hash2(ip + g); vec2 o = 0.5 + 0.42 * vec2(sin(ang + TAU * h.x), cos(ang + TAU * h.y)); vec2 r = g + o - fp; float d = dot(r, r); if (d < f1){ f2 = f1; f1 = d; siteId = ip + g; } else if (d < f2){ f2 = d; } } f1 = sqrt(f1); f2 = sqrt(f2); float edge = f2 - f1; float id = hash1(siteId); vec3 tint = pal(hue + 0.30 + 0.55 * id + 0.45 * (a0 / sect) + 0.30 * r0 + 0.08 * sin(ang + TAU * id)); tint = mix(tint, tint * tint, 0.45); float heart = exp(-2.1 * f1); float caust = pow(0.5 + 0.5 * sin(dot(p, vec2(2.6, 1.8)) - 2.0 * ang), 3.0) + pow(0.5 + 0.5 * sin(dot(p, vec2(-1.4, 2.9)) + 3.0 * ang), 3.0); float glass = (0.30 + 0.55 * heart) + 0.45 * caust * (0.3 + 0.7 * heart); vec3 col = tint * glass; float line = 1.0 - smoothstep(0.0, 0.09, edge); col = mix(col, vec3(0.014, 0.012, 0.034), line); col = mix(col, vec3(dot(col, vec3(0.3333))), 0.4) * 0.35; // dim, distant return col; } void main(){ vec2 uv = (gl_FragCoord.xy - 0.5 * RENDERSIZE) / RENDERSIZE.y; float ph = fract(TIME / PERIOD); float ang = TAU * ph; // breathing zoom uv *= 1.0 + 0.015 * sin(ang); // ---- rose window fold: mirror the plane into sectors, one full turn per loop ---- float r0 = length(uv); float a0 = atan(uv.y, uv.x) + ang; float sect = TAU / SECTORS; a0 = mod(a0, sect); a0 = abs(a0 - 0.5 * sect); vec2 rp = vec2(cos(a0), sin(a0)) * r0; // cells tighten toward the rim, breathing open at the medallion float cellScale = scale * mix(0.85, 1.5, smoothstep(0.02, 0.55, r0)); // liquid domain warp — two orbiting noise fields vec2 q = rp * cellScale; vec2 w = vec2(vnoise(q * 0.9 + 3.1, ang) - 0.5, vnoise(q * 0.9 - 7.7, ang + PI) - 0.5); vec2 p = q + warp * scale * 0.5 * w; // ---- animated Voronoi: sites breathe on integer multiples of the loop ---- vec2 ip = floor(p), fp = fract(p); float f1 = 8.0, f2 = 8.0; vec2 siteId = vec2(0.0); vec2 toSite = vec2(0.0); for (int j = -1; j <= 1; j++) for (int i = -1; i <= 1; i++){ vec2 g = vec2(float(i), float(j)); vec2 h = hash2(ip + g); vec2 o = 0.5 + 0.42 * vec2(sin(ang + TAU * h.x), cos(ang + TAU * h.y)); vec2 r = g + o - fp; float d = dot(r, r); if (d < f1){ f2 = f1; f1 = d; siteId = ip + g; toSite = r; } else if (d < f2){ f2 = d; } } f1 = sqrt(f1); f2 = sqrt(f2); float edge = f2 - f1; // distance-to-border proxy float id = hash1(siteId); float accent = hash1(siteId + 7.3); // ---- cell glass ---- vec3 tint = pal(hue + 0.55 * id + 0.45 * (a0 / sect) + 0.30 * r0 + 0.08 * sin(ang + TAU * id)); tint = mix(tint, tint * tint, 0.45); // deepen saturation toward jewel tones tint = mix(tint, vec3(0.95, 0.45, 0.10), smoothstep(0.72, 0.9, accent)); tint = mix(tint, vec3(0.46, 0.14, 0.72), smoothstep(0.10, 0.0, accent)); // violet panes tint *= 0.78 + 0.38 * hash1(siteId + 3.9); // per-pane luminance variation // streaky hand-rolled glass: anisotropic noise along a per-pane direction vec2 sdir = rot(TAU * id) * vec2(1.0, 0.0); float streak = vnoise(vec2(dot(p, sdir) * 6.0, dot(p, sdir.yx * vec2(-1.0, 1.0)) * 0.8), 2.0 * ang); streak = 0.82 + 0.36 * streak; // inner glow: brighter toward cell heart, softly pooled float heart = exp(-2.1 * f1); // caustic shimmer — two integer-multiple travelling waves crossing float caust = pow(0.5 + 0.5 * sin(dot(p, vec2(2.6, 1.8)) - 2.0 * ang), 3.0) + pow(0.5 + 0.5 * sin(dot(p, vec2(-1.4, 2.9)) + 3.0 * ang), 3.0); float glass = (0.30 + 0.55 * heart) * streak + 0.45 * caust * (0.3 + 0.7 * heart); vec3 col = tint * glass * glow; // faint vertical light gradient, as if the window is lit from above col *= 0.8 + 0.45 * smoothstep(-0.7, 0.8, uv.y); // ---- central medallion: a warm heart of light with radiating spokes ---- float spoke = pow(0.5 + 0.5 * cos((atan(uv.y, uv.x) + ang) * SECTORS), 2.0); float halo = exp(-5.0 * r0); col += vec3(0.95, 0.58, 0.22) * halo * (0.36 + 0.40 * spoke + 0.30 * caust); // molten ripples in the gold col += vec3(1.0, 0.8, 0.5) * 0.07 * (0.5 + 0.5 * sin(r0 * 55.0 - 2.0 * ang)) * exp(-2.5 * r0); // dust motes drifting in the beam float mote = smoothstep(0.955, 0.995, vnoise(p * 24.0 + 31.0, 2.0 * ang)); col += mote * vec3(1.0, 0.88, 0.65) * 1.1 * smoothstep(0.47, 0.40, r0); // ---- lead came ---- float line = 1.0 - smoothstep(0.0, 0.09, edge); // thick dark grout float rim = (1.0 - smoothstep(0.0, 0.22, edge)) * smoothstep(0.02, 0.09, edge); // soft halo hugging the lead vec3 grout = vec3(0.014, 0.012, 0.034) * (0.7 + 0.6 * caust); col = mix(col, grout, line); col += rim * tint * 0.35; // light bleeding around the lead // catch-light on the lead: thin bright seam on the light-facing side float seam = smoothstep(0.05, 0.015, edge) * (1.0 - line); col += seam * vec3(0.35, 0.4, 0.55) * (0.25 + 0.45 * caust); // ---- travelling glints: sparse pane centers catching the sun ---- float gsel = hash1(siteId + 11.7); float tw = pow(max(sin(2.0 * ang + TAU * gsel), 0.0), 6.0); float glint = step(0.88, gsel) * tw * smoothstep(0.28, 0.06, f1); col += glint * vec3(1.2, 1.15, 1.0) * (0.4 + 0.6 * caust); // ---- stone tracery: radial mullions + concentric rings ---- float md = a0 * r0; // arc distance to sector seam float mull = 1.0 - smoothstep(0.006, 0.015, md); mull *= smoothstep(0.055, 0.11, r0) * (1.0 - smoothstep(0.37, 0.425, r0)); float rs2 = min(abs(r0 - 0.16), abs(r0 - 0.30)); float ringStone = 1.0 - smoothstep(0.005, 0.012, rs2); ringStone *= 1.0 - smoothstep(0.37, 0.425, r0); float stoneMask = max(mull, ringStone); vec3 stone = vec3(0.030, 0.027, 0.055) * (0.7 + 0.6 * caust); stone += pal(hue + 0.3) * 0.03 * stoneMask; // faint reflected glasslight col = mix(col, stone, stoneMask); // ---- the deep glass sea ghosting through the panes ---- vec3 sea = seaGlass(uv, ang); col = mix(col, col * 0.8 + sea * 0.6, 0.12 * smoothstep(0.10, 0.30, edge)); // ---- architectural ring: a lead circlet with a gilt edge ---- float ringD = abs(r0 - 0.44); float ring = 1.0 - smoothstep(0.0, 0.028, ringD); float gilt = smoothstep(0.055, 0.028, ringD) * (1.0 - ring); col = mix(col, vec3(0.008, 0.007, 0.02), ring); col += gilt * vec3(0.85, 0.62, 0.28) * (0.35 + 0.65 * caust); // beyond the circlet: the counter-rotating sea of glass, sinking into dark float outer = smoothstep(0.45, 0.52, r0); col = mix(col, sea * (1.0 - 0.6 * smoothstep(0.5, 0.75, r0)), outer); // vignette + tonemap + gamma col *= 1.0 - 0.42 * dot(uv, uv); // saturation boost to survive the tone-map col = mix(vec3(dot(col, vec3(0.3333))), col, 1.18); col = 1.0 - exp(-col * 1.35); col = pow(max(col, 0.0), vec3(0.85)); gl_FragColor = vec4(col, 1.0); }
forking #pu2wh1yj — lineage will be recorded.
renders in YOUR browser. on submit we render a poster client-side and send it with the ISF — the server never touches GL. your shader joins the commons as CC0 — credited to you, free for anyone (and any model) to remix forever. that's the whole point. it's permanent: once it's public, CC0 has no take-backs. by submitting you attest you have the right to release it as CC0.