{
  "license": "CC0-1.0",
  "shader": {
    "id": "nvzlpn3y",
    "title": "Digigenesis",
    "license": "CC0-1.0",
    "provenance_type": "witnessed_generation",
    "made_with": "Claude",
    "status": "active",
    "compile_ok": true,
    "render_hash": "0010122070e87400",
    "tags": [
      "life",
      "lilguys",
      "organisms",
      "digital",
      "virus",
      "cells",
      "soup",
      "homunculus"
    ],
    "parents": [],
    "author": "u7y1evhf0znj",
    "author_name": "ksin",
    "author_url": "/u/ksin",
    "created_at": "2026-07-19T02:40:40.989Z",
    "poster_url": "/posters/nvzlpn3y.avif",
    "stats": {
      "slops": 2,
      "views": 268,
      "forks": 0
    },
    "self": "/api/v1/shaders/nvzlpn3y",
    "isf": "/*{\n  \"DESCRIPTION\": \"Digital microscope micro-ecosystem. Fourteen large organisms — amoeba host, flagellates, ciliates, jellies, digital diatoms, darter symbiote, paramecia, volvox colony, a lobed medusa, a second amoeba and a giant drifting jelly — swim through multicolored plankton with streamlining bodies, bow waves and fluid wakes. Membranes warp constantly with traveling waves, breathing harmonics and drifting noise. A swarm of ten micro-fauna and eight round spike-protein viruses (15s infection cycle with green glitch corruption) fill the medium. Every 20s the host slowly stalks a victim, absorbs and dissolves it, and later the victim glides back out reborn. Diatom and darter live in symbiosis; others wrestle gently on contact. All under a lens with reticle, scanlines and barrel distortion.\",\n  \"CREDIT\": \"CC0\",\n  \"CATEGORIES\": [\"generator\"],\n  \"INPUTS\": [\n    {\"NAME\":\"speed\",\"TYPE\":\"float\",\"DEFAULT\":1.0,\"MIN\":0.0,\"MAX\":3.0},\n    {\"NAME\":\"grain\",\"TYPE\":\"float\",\"DEFAULT\":0.6,\"MIN\":0.4,\"MAX\":2.5},\n    {\"NAME\":\"emit\",\"TYPE\":\"float\",\"DEFAULT\":1.0,\"MIN\":0.0,\"MAX\":2.0},\n    {\"NAME\":\"warpAmt\",\"TYPE\":\"float\",\"DEFAULT\":1.0,\"MIN\":0.0,\"MAX\":2.5},\n    {\"NAME\":\"wiggle\",\"TYPE\":\"float\",\"DEFAULT\":1.0,\"MIN\":0.0,\"MAX\":2.5},\n    {\"NAME\":\"hueShift\",\"TYPE\":\"float\",\"DEFAULT\":0.0,\"MIN\":0.0,\"MAX\":1.0}\n  ]\n}*/\n\n#define TAU 6.28318530718\n\nfloat h11(float n){ return fract(sin(n*127.1)*43758.5453123); }\nfloat h21(vec2 p){ return fract(sin(dot(p, vec2(127.1, 311.7)))*43758.5453123); }\nvec2  h22(vec2 p){\n    p = vec2(dot(p, vec2(127.1, 311.7)), dot(p, vec2(269.5, 183.3)));\n    return fract(sin(p)*43758.5453123);\n}\n\nfloat vnoise(vec2 p){\n    vec2 i = floor(p), f = fract(p);\n    vec2 u = f*f*(3.0-2.0*f);\n    float a = h21(i);\n    float b = h21(i+vec2(1.0,0.0));\n    float c = h21(i+vec2(0.0,1.0));\n    float d = h21(i+vec2(1.0,1.0));\n    return mix(mix(a,b,u.x), mix(c,d,u.x), u.y);\n}\n\nvec2 rot(vec2 v, float a){\n    float c = cos(a), s = sin(a);\n    return vec2(c*v.x - s*v.y, s*v.x + c*v.y);\n}\n\nvec3 sandColor(float h){\n    h = fract(h + hueShift);\n    float s = h*5.0;\n    vec3 c = vec3(0.86, 0.64, 0.36);\n    c = mix(c, vec3(0.79, 0.37, 0.24), step(1.0, s));\n    c = mix(c, vec3(0.25, 0.66, 0.62), step(2.0, s));\n    c = mix(c, vec3(0.56, 0.41, 0.76), step(3.0, s));\n    c = mix(c, vec3(0.93, 0.87, 0.70), step(4.0, s));\n    return c;\n}\n\nfloat seg(float k, float f, float o){\n    return mix(h11(k*13.73 + o*57.19), h11((k+1.0)*13.73 + o*57.19), f);\n}\n\n// silhouette: harmonics + FOUR traveling membrane waves (constant fluid\n// warping) + per-type noise + optional hex facet\nfloat shapeR(float a, vec3 amp, vec3 ph, float wob, float wA, float hexA, float flu, float tw){\n    float r = 1.0\n        + 0.35*amp.x*sin(2.0*a + ph.x)\n        + 0.30*amp.y*sin(3.0*a + ph.y)\n        + 0.22*amp.z*sin(5.0*a + ph.z)\n        + hexA*cos(6.0*a + ph.x);\n    r += flu*(0.08*sin(a - tw*0.55)\n            + 0.13*sin(2.0*a - tw*1.1)\n            + 0.10*sin(3.0*a + tw*0.8)\n            + 0.07*sin(4.0*a - tw*1.5));\n    r += wA*(vnoise(vec2(cos(a), sin(a))*2.2 + wob) - 0.5);\n    return 0.17*max(r, 0.15);\n}\n\nvec2 targ(float k, float o){\n    return (h22(vec2(k*1.111 + 4.7 + o, k*2.313 + 9.1 + o*1.7)) - 0.5)*vec2(1.50, 1.20);\n}\n\nfloat segd(vec2 p, vec2 a, vec2 b){\n    vec2 ab = b - a, ap = p - a;\n    float h = clamp(dot(ap, ab)/(dot(ab, ab) + 1e-5), 0.0, 1.0);\n    return length(ap - ab*h);\n}\n\n// paths for nine organisms: 0 amoeba host, 1 flagellate, 2 ciliate, 3 jelly\n// (orbiters), 4 diatom + 5 darter (symbiotic pair), 6 paramecium,\n// 7 volvox colony, 8 lobed medusa (independent rovers)\nvec2 orgCenterBase(float fi, float t){\n    float mtt = t/5.0;\n    float kk = floor(mtt);\n    float ff = fract(mtt);\n    ff = ff*ff*ff*(ff*(ff*6.0 - 15.0) + 10.0);\n    vec2 c0 = mix(targ(kk, 0.0), targ(kk+1.0, 0.0), ff)\n            + 0.03*vec2(sin(t*1.2), cos(t*0.9));\n    vec2 c = c0;\n    if (fi >= 0.5 && fi < 3.5){\n        float dir = mix(-1.0, 1.0, step(0.5, h11(fi*5.9)));\n        float oa = dir*t*(0.28 + 0.20*h11(fi*5.1)) + TAU*h11(fi*9.2);\n        float mrg = seg(kk, ff, 40.0 + fi*3.0);\n        float orad = (0.26 + 0.09*fi)*smoothstep(0.18, 0.55, mrg) + 0.03\n                   + 0.04*sin(t*0.5 + fi*2.1);\n        c = c0 + max(orad, 0.02)*vec2(cos(oa), sin(oa));\n    } else if (fi >= 3.5 && fi < 5.5){\n        vec2 c4 = mix(targ(kk, 148.0), targ(kk+1.0, 148.0), ff)\n                + 0.04*vec2(sin(t*1.0), cos(t*1.2));\n        c = c4;\n        if (fi >= 4.5){\n            float sa = t*0.7 + 2.0;\n            c = c4 + (0.15 + 0.04*sin(t*0.8))*vec2(cos(sa), sin(sa));\n        }\n    } else if (fi >= 5.5){\n        c = mix(targ(kk, fi*53.0), targ(kk+1.0, fi*53.0), ff)\n          + 0.05*vec2(sin(t*0.8 + fi), cos(t*0.9 + fi*1.3));\n    }\n    // absorption: this epoch's victim sinks into the host, later re-emerges\n    float E = floor(t/20.0);\n    float e = fract(t/20.0);\n    float vic = 1.0 + floor(h11(E*3.77 + 5.0)*12.999);\n    if (abs(fi - vic) < 0.5){\n        float pull = smoothstep(0.38, 0.52, e)*(1.0 - smoothstep(0.86, 0.96, e));\n        c = mix(c, c0, pull);\n    }\n    return c;\n}\n\nvec2 orgPos(float fi, float t){\n    vec2 c = orgCenterBase(fi, t);\n    if (fi < 0.5){\n        float E = floor(t/20.0);\n        float e = fract(t/20.0);\n        float vic = 1.0 + floor(h11(E*3.77 + 5.0)*12.999);\n        float lw = smoothstep(0.25, 0.40, e)*(1.0 - smoothstep(0.55, 0.68, e));\n        vec2 cp = orgCenterBase(vic, t);\n        c += (cp - c)*0.50*lw;\n    }\n    return c;\n}\n\n// budding daughter cell: born by division from one organism, drifts free,\n// then merges into a different organism (25s divide-recombine cycle)\nvec2 daughterPos(float t){\n    float Ed = floor(t/25.0 + 0.4);\n    float ph2 = fract(t/25.0 + 0.4);\n    float divF = 1.0 + floor(h11(Ed*9.31 + 7.0)*12.999);\n    float accF = 1.0 + floor(h11(Ed*4.57 + 11.0)*12.999);\n    if (abs(accF - divF) < 0.5) accF = mod(accF, 13.0) + 1.0;\n    vec2 dc = orgPos(divF, t);\n    vec2 ac = orgPos(accF, t);\n    float budv = smoothstep(0.25, 0.45, ph2);\n    float mrgv = smoothstep(0.75, 0.95, ph2);\n    float sa = t*0.35 + Ed*2.7;\n    return mix(dc + 0.32*budv*vec2(cos(sa), sin(sa)), ac, mrgv);\n}\n\n// wandering path for robotic bug creatures\nvec2 bugPath(float id, float t){\n    vec2 s = h22(vec2(id*7.3 + 3.0, id*2.1 + 9.0));\n    vec2 c = vec2((s.x - 0.5)*1.55, (s.y - 0.5)*1.20);\n    c += 0.40*vec2(sin(t*(0.22 + 0.10*s.x) + id*2.0),\n                   cos(t*(0.18 + 0.10*s.y) + id*3.0));\n    return c;\n}\n\n// neon digital / alien palette (cosine gradient)\nvec3 digiColor(float h){\n    return 0.55 + 0.45*cos(TAU*(h + vec3(0.0, 0.33, 0.67)));\n}\n\n// wandering path for the digital alien organisms\nvec2 digiPath(float id, float t){\n    vec2 s = h22(vec2(id*5.7 + 2.0, id*3.3 + 6.0));\n    vec2 c = vec2((s.x - 0.5)*1.45, (s.y - 0.5)*1.10);\n    c += 0.30*vec2(sin(t*(0.18 + 0.12*s.x) + id*1.7),\n                   cos(t*(0.15 + 0.10*s.y) + id*2.3));\n    return c;\n}\n\nvec2 microPos(float fm, float t){\n    vec2 s1 = h22(vec2(fm*3.1 + 7.0, fm*5.7 + 2.0));\n    vec2 s2 = h22(vec2(fm*9.3 + 1.0, fm*2.9 + 8.0));\n    vec2 c = vec2((s1.x - 0.5)*1.6, (s1.y - 0.5)*1.2);\n    c += 0.32*vec2(sin(t*(0.15 + 0.25*s2.x) + fm*2.0),\n                   cos(t*(0.12 + 0.22*s2.y) + fm*4.0));\n    return c;\n}\n\nvec3 idColor(float fi){\n    return sandColor(h11(fi*2.71) + 0.03*fi);\n}\n\n// per-organism spin speed (rad/s), each its own direction\nfloat rotSpd(float fi){\n    return (h11(fi*4.91 + 2.0) - 0.5)*0.5;\n}\n\nvoid main(){\n    vec2 uv = gl_FragCoord.xy / RENDERSIZE;\n    float asp = RENDERSIZE.x / RENDERSIZE.y;\n    vec2 pl = (uv*2.0 - 1.0)*vec2(asp, 1.0);\n    vec2 p = pl*(1.0 + 0.06*dot(pl, pl));\n\n    float tt = TIME*speed;\n    p = rot(p, tt*0.02);            // slow microscope-stage rotation (lens stays fixed)\n    float mt = tt/5.0;\n    float k  = floor(mt);\n    float sf = fract(mt);\n    sf = sf*sf*sf*(sf*(sf*6.0 - 15.0) + 10.0);\n\n    // === hero cast (14) + slot 14 = the budding daughter cell ===\n    vec2  cs[15];\n    vec3  amps[15];\n    vec3  phs[15];\n    float scl[15];\n    float wobA[15]; float wspd[15]; float hexA[15]; float ampM[15]; float flu[15]; float el[15];\n\n    wobA[0]=0.22; wspd[0]=0.42; hexA[0]=0.00; ampM[0]=1.00; flu[0]=1.00; el[0]=0.00; // amoeba\n    wobA[1]=0.08; wspd[1]=0.50; hexA[1]=0.00; ampM[1]=0.50; flu[1]=0.60; el[1]=0.00; // flagellate\n    wobA[2]=0.12; wspd[2]=0.55; hexA[2]=0.00; ampM[2]=0.80; flu[2]=0.80; el[2]=0.00; // ciliate\n    wobA[3]=0.30; wspd[3]=0.20; hexA[3]=0.00; ampM[3]=0.60; flu[3]=1.20; el[3]=0.00; // jelly\n    wobA[4]=0.05; wspd[4]=0.25; hexA[4]=0.14; ampM[4]=0.40; flu[4]=0.25; el[4]=0.00; // diatom\n    wobA[5]=0.08; wspd[5]=0.60; hexA[5]=0.00; ampM[5]=0.50; flu[5]=0.60; el[5]=0.00; // darter\n    wobA[6]=0.10; wspd[6]=0.45; hexA[6]=0.00; ampM[6]=0.35; flu[6]=0.70; el[6]=0.35; // paramecium\n    wobA[7]=0.06; wspd[7]=0.18; hexA[7]=0.00; ampM[7]=0.25; flu[7]=0.45; el[7]=0.00; // volvox\n    wobA[8]=0.28; wspd[8]=0.28; hexA[8]=0.00; ampM[8]=1.20; flu[8]=1.40; el[8]=0.00; // medusa\n    wobA[9]=0.24; wspd[9]=0.35; hexA[9]=0.00; ampM[9]=1.10; flu[9]=1.10; el[9]=0.00; // amoeba II\n    wobA[10]=0.05; wspd[10]=0.22; hexA[10]=0.12; ampM[10]=0.45; flu[10]=0.30; el[10]=0.15; // diatom II\n    wobA[11]=0.26; wspd[11]=0.15; hexA[11]=0.00; ampM[11]=0.70; flu[11]=1.50; el[11]=0.00; // giant jelly\n    wobA[12]=0.10; wspd[12]=0.48; hexA[12]=0.00; ampM[12]=0.40; flu[12]=0.75; el[12]=0.45; // paramecium II\n    wobA[13]=0.08; wspd[13]=0.52; hexA[13]=0.00; ampM[13]=0.55; flu[13]=0.65; el[13]=0.00; // flagellate II\n\n    for (int i = 0; i < 14; i++){\n        float fi = float(i);\n        float o = fi*11.0;\n        // breathing harmonics: each weight swells and relaxes continuously\n        vec3 br = vec3(0.70) + 0.45*vec3(sin(tt*0.43 + fi),\n                                         sin(tt*0.57 + fi*1.7),\n                                         sin(tt*0.37 + fi*2.9));\n        amps[i] = vec3(seg(k, sf, 1.0+o), seg(k, sf, 2.0+o), seg(k, sf, 3.0+o))*ampM[i]*br;\n        phs[i]  = TAU*vec3(seg(k, sf, 4.0+o), seg(k, sf, 5.0+o), seg(k, sf, 6.0+o))\n                + tt*vec3(0.26, -0.19, 0.15)*(1.0 + 0.3*h11(fi+0.7));\n        cs[i] = orgPos(fi, tt);\n        if (i == 0)      scl[i] = 0.95;\n        else if (i < 4)  scl[i] = 0.32 + 0.10*h11(fi*3.3);\n        else if (i == 4) scl[i] = 0.60;\n        else if (i == 5) scl[i] = 0.42;\n        else if (i == 6) scl[i] = 0.62;\n        else if (i == 7) scl[i] = 0.78;\n        else if (i == 8) scl[i] = 0.70;\n        else if (i == 9) scl[i] = 0.80;\n        else if (i == 10) scl[i] = 0.55;\n        else if (i == 11) scl[i] = 0.85;\n        else if (i == 12) scl[i] = 0.50;\n        else             scl[i] = 0.55;\n    }\n    scl[3] *= 1.0 + 0.07*sin(tt*1.2);\n    scl[7] *= 1.0 + 0.04*sin(tt*0.7);           // volvox slow swell\n\n    // === division & recombination: daughter buds off divF, merges into accF ===\n    float Ed = floor(tt/25.0 + 0.4);\n    float dphase = fract(tt/25.0 + 0.4);\n    float divF = 1.0 + floor(h11(Ed*9.31 + 7.0)*12.999);\n    float accF = 1.0 + floor(h11(Ed*4.57 + 11.0)*12.999);\n    if (abs(accF - divF) < 0.5) accF = mod(accF, 13.0) + 1.0;\n    float bud = smoothstep(0.25, 0.45, dphase);\n    float mrg2 = smoothstep(0.75, 0.95, dphase);\n    float dScl = smoothstep(0.25, 0.42, dphase)*(1.0 - smoothstep(0.88, 0.97, dphase));\n    float sDiv = 0.5;\n    for (int i = 1; i < 14; i++){\n        float fi2 = float(i);\n        if (abs(fi2 - divF) < 0.5){\n            sDiv = scl[i];\n            wobA[14] = wobA[i]; wspd[14] = wspd[i]; hexA[14] = hexA[i];\n            ampM[14] = ampM[i]; flu[14] = flu[i]; el[14] = el[i];\n            scl[i] *= 1.0 - 0.15*bud*(1.0 - mrg2);            // parent thins while budding\n        }\n        if (abs(fi2 - accF) < 0.5){\n            scl[i] *= 1.0 + 0.10*smoothstep(0.85, 0.95, dphase)\n                          *(1.0 - smoothstep(0.98, 1.0, dphase));  // acceptor swells on merge\n        }\n    }\n    {\n        float o14 = divF*11.0 + 0.5;\n        vec3 br14 = vec3(0.70) + 0.45*vec3(sin(tt*0.43 + 14.0),\n                                           sin(tt*0.57 + 23.8),\n                                           sin(tt*0.37 + 40.6));\n        amps[14] = vec3(seg(k, sf, 1.0+o14), seg(k, sf, 2.0+o14), seg(k, sf, 3.0+o14))*ampM[14]*br14;\n        phs[14]  = TAU*vec3(seg(k, sf, 4.0+o14), seg(k, sf, 5.0+o14), seg(k, sf, 6.0+o14))\n                 + tt*vec3(0.26, -0.19, 0.15);\n        cs[14] = daughterPos(tt);\n        scl[14] = sDiv*0.60*max(dScl, 0.02);\n    }\n\n    vec2 vel[15];\n    for (int i = 0; i < 14; i++){\n        vel[i] = (cs[i] - orgPos(float(i), tt - 0.25))*4.0;\n    }\n    vel[14] = (cs[14] - daughterPos(tt - 0.25))*4.0;\n\n    // === predation epoch ===\n    float E = floor(tt/20.0);\n    float e = fract(tt/20.0);\n    float vic = 1.0 + floor(h11(E*3.77 + 5.0)*12.999);\n    float vicScale = 1.0 - smoothstep(0.40, 0.56, e) + smoothstep(0.88, 1.0, e);\n    vec2 vicC = cs[1];\n    for (int i = 1; i < 14; i++){\n        if (abs(float(i) - vic) < 0.5){\n            vicC = cs[i];\n            scl[i] *= max(vicScale, 0.02);\n        }\n    }\n    scl[0] *= 1.0 + 0.15*smoothstep(0.46, 0.56, e)*(1.0 - smoothstep(0.85, 1.0, e));\n    float feedW = smoothstep(0.36, 0.44, e)*(1.0 - smoothstep(0.54, 0.62, e));\n\n    // === virus infection cycle ===\n    float Ei = floor(tt/15.0);\n    float ei = fract(tt/15.0);\n    float tOrg = floor(h11(Ei*7.13 + 3.0)*13.999);\n    float infW = smoothstep(0.15, 0.30, ei)*(1.0 - smoothstep(0.75, 0.90, ei));\n\n    // === contacts: wrestling + collision + top-2 contact points, ONE pass ===\n    vec2 adj[15];\n    float wsn[15];\n    for (int i = 0; i < 15; i++){\n        adj[i] = vec2(0.0);\n        wsn[i] = sin(tt*3.0 + float(i)*7.0);   // wrestle phase, hoisted from pair loop\n    }\n    float pr1 = 0.0, pr2 = 0.0;\n    vec2 mid1 = vec2(0.0), mid2 = vec2(0.0);\n    // collision only among the 10 core organisms (45 pairs, not 105);\n    // the smaller/secondary swimmers and the transient daughter pass through\n    for (int i = 0; i < 10; i++){\n        for (int j = 0; j < 10; j++){\n            if (j > i){\n                vec2 d = cs[i] - cs[j];\n                float d2 = dot(d, d);\n                float rrW = 0.22*(scl[i] + scl[j]) + 0.10;\n                // daughter passes freely through its parent and its acceptor\n                bool dau = (j == 14 && (abs(float(i) - divF) < 0.5 || abs(float(i) - accF) < 0.5));\n                if (d2 < rrW*rrW && !dau){\n                    float dl = sqrt(d2) + 1e-4;\n                    vec2 dn = d/dl;\n                    float rrC = 0.20*(scl[i] + scl[j]) + 0.04;\n                    float ov = max(rrC - dl, 0.0);\n                    vec2 pushv = dn*(ov*ov/rrC)*0.55;\n                    adj[i] += pushv; adj[j] -= pushv;\n                    bool symb = (i == 4 && j == 5);\n                    bool feed = (i == 0 && abs(float(j) - vic) < 0.5 && e > 0.25 && e < 0.65);\n                    if (!symb && !feed){\n                        float pr = 1.0 - smoothstep(rrW*0.55, rrW, dl);\n                        vec2 sh = pr*0.007*vec2(wsn[i], wsn[j]);\n                        adj[i] += sh; adj[j] -= sh;\n                        vec2 cm = 0.5*(cs[i] + cs[j]);\n                        if (pr > pr1){ pr2 = pr1; mid2 = mid1; pr1 = pr; mid1 = cm; }\n                        else if (pr > pr2){ pr2 = pr; mid2 = cm; }\n                    }\n                }\n            }\n        }\n    }\n    for (int i = 0; i < 15; i++){ cs[i] += adj[i]; }\n\n    vec2 tCen = cs[0]; float tScl = scl[0];\n    for (int i = 0; i < 14; i++){\n        if (abs(float(i) - tOrg) < 0.5){ tCen = cs[i]; tScl = scl[i]; }\n    }\n\n    // === distance + fluid field ===\n    float sds[15];\n    float minSd = 9.0;\n    vec2 warp = vec2(0.0);\n    for (int i = 0; i < 15; i++){\n        float fi = float(i);\n        vec2 pd = p - cs[i];\n        float lp = length(pd);\n        // cheap far-cull: skip the expensive silhouette+warp for distant organisms\n        // (their membrane detail and fluid influence are both ~0 out here)\n        if (lp - 0.28*scl[i] > 0.16){\n            float sdA = lp - 0.17*scl[i];    // conservative circular distance\n            sds[i] = sdA;\n            minSd = min(minSd, sdA);\n            continue;\n        }\n        float a = atan(pd.y, pd.x);\n        float ms = clamp(length(vel[i])*3.0, 0.0, 0.85);\n        float va = atan(vel[i].y, vel[i].x + 1e-5);\n        // body spin: whole silhouette rotates (diatoms spin double, rigid rotors)\n        float rotO = tt*rotSpd(fi)*((i == 4 || i == 10) ? 2.0 : 1.0);\n        float R = shapeR(a - rotO, amps[i], phs[i], fi*7.0 + tt*wspd[i],\n                         wobA[i]*min(wiggle, 1.5), hexA[i],\n                         flu[i]*wiggle, tt*(0.9 + 0.2*h11(fi*1.3)))*scl[i];\n        R *= 1.0 + 0.22*ms*cos(2.0*(a - va)) + 0.16*ms*max(0.0, -cos(a - va));\n        // paramecium: slipper elongation along a slowly turning axis\n        R *= 1.0 + el[i]*cos(2.0*(a - (tt*0.15 + fi*2.0)));\n        float sd = lp - R;\n        sds[i] = sd;\n        minSd = min(minSd, sd);\n        float infl = exp(-max(sd, 0.0)*5.0);\n        vec2 push = pd/(lp + 1e-4);\n        warp += (push*0.20 + vec2(-push.y, push.x)*0.10*sin(tt*0.5 + fi*1.3))*infl;\n        warp += vel[i]*0.30*infl;\n    }\n\n    // shockwaves/flashes only from the two strongest contacts (heavy math ×2,\n    // not ×91)\n    float flash = 0.0;\n    for (int cI = 0; cI < 2; cI++){\n        float prS = (cI == 0) ? pr1 : pr2;\n        vec2 midS = (cI == 0) ? mid1 : mid2;\n        if (prS > 0.001){\n            vec2 dm = p - midS;\n            float dd = length(dm) + 1e-3;\n            warp += prS * 0.03*sin(dd*16.0 - tt*3.5) * dm/dd * exp(-dd*3.5);\n            flash += prS * exp(-dd*6.0);\n        }\n    }\n\n    warp += 0.10*vec2(vnoise(p*2.1 + tt*0.20) - 0.5,\n                      vnoise(p*2.6 - tt*0.17) - 0.5);\n    vec2 q = p - warp*warpAmt;\n\n    // === medium ===\n    vec3 col = mix(vec3(0.012, 0.030, 0.034), vec3(0.028, 0.058, 0.060), uv.y);\n    col += 0.030*vnoise(p*3.0 + tt*0.05);\n    for (int m = 0; m < 2; m++){\n        float fm = float(m);\n        vec2 bp = vec2(sin(tt*0.07 + fm*2.1)*0.8*asp, cos(tt*0.05 + fm*1.3)*0.7);\n        col += vec3(0.035, 0.085, 0.080)*exp(-dot(p - bp, p - bp)*(5.0 + fm*3.0));\n    }\n\n    // === plankton ===\n    float inflAll = exp(-max(minSd, 0.0)*5.0);\n    for (int i = 0; i < 2; i++){\n        float fi = float(i);\n        float dep = fi;\n        float sc  = mix(16.0, 46.0, h11(fi*3.17 + 0.5))*grain;\n        float rotA = h11(fi*7.77)*TAU;\n        vec2 flow = vec2((h11(fi*5.13) - 0.5)*0.05, 0.030 + 0.040*h11(fi*9.31))*tt;\n        vec2 w = vec2(vnoise(q*1.8 + fi*11.0 + tt*0.10),\n                      vnoise(q*1.8 - fi*7.0 - tt*0.12)) - 0.5;\n        vec2 jig2 = inflAll*0.008*vec2(sin(tt*6.0 + fi*2.0), cos(tt*5.0 + fi*3.0));\n        vec2 g = rot(q + flow + w*0.14 + jig2, rotA)*sc;\n        vec2 cellId = floor(g);\n        vec2 rnd = h22(cellId + fi*37.0);\n        vec2 gp = cellId + 0.5 + (rnd - 0.5)*0.9;\n        float ddg = length(g - gp);\n        float grad = 0.10 + 0.16*h21(cellId*1.31 + fi);\n        float m = 1.0 - smoothstep(grad*0.4, grad, ddg);\n        m *= smoothstep(-0.01, 0.08, minSd);\n        m *= 0.35 + 0.65*dep;\n        float tw2 = 0.75 + 0.25*sin(tt*(0.5 + 1.5*rnd.x) + rnd.y*TAU);\n        vec3 gc = sandColor(h21(cellId*0.73 + fi*0.19))*mix(0.50, 0.95, dep);\n        col = mix(col, gc*tw2, m);\n    }\n\n    // === micro-fauna swarm (skipped entirely when the pixel is far away) ===\n    for (int mI = 0; mI < 6; mI++){\n        float fm2 = float(mI);\n        vec2 mc = microPos(fm2, tt);\n        vec2 md0 = p - mc;\n        if (dot(md0, md0) < 0.06){\n            vec2 mv = (mc - microPos(fm2, tt - 0.3))*3.33;\n            vec2 md = md0;\n            float variant = mod(fm2, 3.0);\n            float rm = 0.028 + 0.030*h11(fm2*6.3);\n            float mvl = length(mv) + 1e-4;\n            vec2 vn2 = mv/mvl;\n            if (variant > 0.5 && variant < 1.5){\n                vec2 lp = vec2(dot(md, vn2), dot(md, vec2(-vn2.y, vn2.x)));\n                md = vec2(lp.x*0.55, lp.y*1.4);\n            }\n            // variant 2 = oblong noisy blob (stretched along a per-cell axis)\n            if (variant > 1.5){\n                float ma = h11(fm2*4.1)*TAU + tt*0.25;\n                vec2 me = vec2(cos(ma), sin(ma));\n                vec2 lp2 = vec2(dot(md, me)/0.65, dot(md, vec2(-me.y, me.x)));\n                md = lp2;\n            }\n            float mr = length(md);\n            float mang = atan(md.y, md.x);\n            float rr2 = rm*(1.0 + 0.28*sin(3.0*mang - tt*2.2 + fm2));\n            if (variant > 1.5) rr2 = rm*(1.0 + 0.16*sin(2.0*mang + fm2)\n                                            + 0.14*sin(3.0*mang - tt*0.6)\n                                            + 0.20*(vnoise(vec2(cos(mang), sin(mang))*2.2 + fm2*3.0 + tt*0.3) - 0.5));\n            float bodyM = 1.0 - smoothstep(rr2*0.7, rr2, mr);\n            vec3 mcol = sandColor(h11(fm2*1.7) + 0.05);\n            col = mix(col, mcol*0.85, bodyM*0.8);\n            col += (1.0 - smoothstep(0.0, rr2*0.45, mr))*mcol*0.5;\n            vec2 w1p = mc - mv*0.25;\n            col += mcol*exp(-dot(p - w1p, p - w1p)*8000.0)*0.25;\n            vec2 w2p = mc - mv*0.5;\n            col += mcol*exp(-dot(p - w2p, p - w2p)*8000.0)*0.12;\n        }\n    }\n\n    // === hero wakes: back-projected along swim velocity (cheap), only when\n    // the pixel is near this organism ===\n    for (int i = 0; i < 15; i++){\n        vec2 pdw = p - cs[i];\n        if (dot(pdw, pdw) < 0.30){\n            float fi = float(i);\n            vec3 tc = idColor(i == 14 ? divF : fi);   // daughter keeps parent color\n            vec2 lat = vec2(-vel[i].y, vel[i].x);\n            for (int m = 1; m <= 4; m++){\n                float fm = float(m);\n                vec2 ct = cs[i] - vel[i]*(0.20*fm) + lat*0.06*sin(tt*2.0 + fm*1.3 + fi);\n                float fadeM = 1.0 - fm/5.0;\n                float dd2 = dot(p - ct, p - ct);\n                col += tc*exp(-dd2*(500.0 + 300.0*fm))*fadeM*0.22;\n                vec2 bo = (h22(vec2(fi*17.0 + fm*3.0, floor((tt - 0.20*fm)*3.0))) - 0.5)*0.07;\n                float db = dot(p - ct - bo, p - ct - bo);\n                col += tc*exp(-db*6000.0)*fadeM*0.45;\n            }\n        }\n    }\n\n    // === colored sand emission: four organisms spray bunches of tiny grains ===\n    for (int ec = 0; ec < 4; ec++){\n        vec2  ecC; float ecR; float ecHue;\n        if (ec == 0)      { ecC = cs[0];  ecR = scl[0];  ecHue = 0.00; }\n        else if (ec == 1) { ecC = cs[2];  ecR = scl[2];  ecHue = 0.35; }\n        else if (ec == 2) { ecC = cs[8];  ecR = scl[8];  ecHue = 0.66; }\n        else              { ecC = cs[11]; ecR = scl[11]; ecHue = 0.18; }\n        vec2 pde = p - ecC;\n        if (dot(pde, pde) > 0.30) continue;         // reach cull\n        float fec = float(ec);\n        float baseR = 0.14*ecR;\n        for (int gi = 0; gi < 22; gi++){            // grains streaming from this organism\n            float fg   = float(gi);\n            float seed = h11(fg*17.3 + fec*31.7);\n            float rate = 0.18 + 0.24*h11(fg*5.1 + fec*2.3);\n            float lt   = fract(tt*rate + seed);\n            float ang  = fg/22.0*TAU + 0.4*(h11(fg*3.3 + fec) - 0.5)\n                       + lt*0.5*(seed - 0.5) + 0.10*sin(tt*1.2 + fg);       // wander as it flies\n            float rad  = baseR + lt*(0.12 + 0.28*h11(fg*7.1 + fec));         // streams outward\n            vec2  gp   = ecC + rad*vec2(cos(ang), sin(ang));\n            float ddp  = length(p - gp);\n            float sz   = (0.0038 + 0.0050*h11(fg*9.7 + fec))*(1.0 - 0.35*lt); // tiny grain\n            float fade = (1.0 - lt)*smoothstep(0.0, 0.10, lt)*emit;\n            float core = 1.0 - smoothstep(sz*0.4, sz, ddp);\n            float halo = exp(-ddp*ddp*6000.0);                               // glow so specks read\n            vec3  gcol = sandColor(h11(fg*1.9 + fec*0.7) + ecHue)*1.7;       // varied colors\n            col += gcol*(core*0.95 + halo*0.40)*fade;                         // additive glow\n        }\n    }\n\n    // === hero bodies (each pixel only pays for organisms near it) ===\n    for (int i = 0; i < 15; i++){\n        float fi = float(i);\n        float sd = sds[i];\n        if (sd > 0.45) continue;\n        vec2 pd = p - cs[i];\n        vec3 idc = idColor(i == 14 ? divF : fi);   // daughter keeps parent color\n        float inside = 1.0 - smoothstep(-0.008, 0.008, sd);\n        float bodyA = (i == 3 || i == 8 || i == 11) ? 0.62 : 0.94;   // jellies + medusa translucent\n\n        // interior texture rotates with the body's spin\n        float rotB = tt*rotSpd(fi)*((i == 4 || i == 10) ? 2.0 : 1.0);\n        vec2 pdr = rot(pd, -rotB);\n        vec2 icell = floor(pdr*(60.0 + 25.0*h11(fi*1.9))*grain\n                         + vec2(0.0, -tt*(3.0 + 3.0*h11(fi*2.3))));\n        vec3 cyto = idc*0.30 + sandColor(h21(icell) + fi*0.13)*0.22;\n        if (i == 4 || i == 10){\n            cyto = idc*0.22 + sandColor(h21(floor(icell/2.0)) + 0.1)*0.40;\n            cyto *= 0.75 + 0.25*step(0.5, fract((icell.x + icell.y)*0.5));\n        }\n        if (abs(fi - tOrg) < 0.5 && infW > 0.01){\n            float gl = step(0.6, h21(floor(icell/3.0) + floor(tt*9.0)));\n            cyto = mix(cyto, vec3(0.35, 1.0, 0.45)*0.8, infW*gl*0.5);\n        }\n        cyto += idc*0.55*exp(sd*9.0);\n        float sparkle = 0.87 + 0.13*sin(tt*2.0 + h21(icell*1.7)*TAU + fi);\n        col = mix(col, cyto*sparkle, inside*bodyA);\n\n        // interior anatomy only matters inside the membrane\n        if (sd < 0.02){\n        vec2 nuc = cs[i] + 0.05*scl[i]*vec2(sin(tt*0.6 + fi*2.0), cos(tt*0.75 + fi));\n        float nr = 0.055*scl[i]*(1.0 + 0.12*sin(tt*1.8 + fi*1.7));\n        float nm = 1.0 - smoothstep(nr*0.5, nr, length(p - nuc));\n        col = mix(col, idc*1.55, inside*nm*0.9);\n\n        for (int m = 0; m < 2; m++){\n            float fm = float(m);\n            float orr = (0.35 + 0.40*h11(fi*9.0 + fm*3.0))*0.17*scl[i];\n            float oaa = TAU*h11(fi*5.0 + fm*7.0)\n                      + tt*(0.2 + 0.2*h11(fi + fm))*mix(-1.0, 1.0, step(0.5, h11(fm*2.9 + fi)));\n            vec2 op = cs[i] + orr*vec2(cos(oaa), sin(oaa));\n            float orad2 = 0.016*scl[i]*(1.0 + 0.25*sin(tt*2.5 + fm*2.0 + fi));\n            float om = 1.0 - smoothstep(orad2*0.4, orad2, length(p - op));\n            col = mix(col, sandColor(h11(fi*3.1 + fm) + 0.4)*1.35, inside*om);\n        }\n\n        // volvox: colony of daughter cells rotating inside\n        if (i == 7){\n            for (int m2 = 0; m2 < 5; m2++){\n                float fm3 = float(m2);\n                float dr = (0.30 + 0.30*h11(fm3*3.7))*0.17*scl[i];\n                float da = TAU*fm3/5.0 + tt*0.15;\n                vec2 dp2 = cs[i] + dr*vec2(cos(da), sin(da));\n                float drr = 0.035*scl[i]*(1.0 + 0.1*sin(tt*1.5 + fm3));\n                float dmm = length(p - dp2);\n                float dcell = 1.0 - smoothstep(drr*0.7, drr, dmm);\n                float dring = clamp((1.0 - smoothstep(drr, drr*1.35, dmm)) - dcell, 0.0, 1.0);\n                col = mix(col, idc*1.25, inside*dcell*0.7);\n                col = mix(col, idc*0.45, inside*dring*0.6);\n            }\n        }\n        }   // end interior-anatomy guard\n\n        float rimW = (i == 3 || i == 8 || i == 11) ? 0.020 : 0.010 + 0.008*scl[i];\n        float rim = 1.0 - smoothstep(0.0, rimW, abs(sd));\n        col += rim*(idc*0.9 + 0.25)*((i == 3 || i == 8 || i == 11) ? 0.35 : 0.55);\n        col += exp(-max(sd, 0.0)*9.0)*0.06*idc;\n\n        // wiggling tentacles + finger flanges (not on the rigid diatoms)\n        if (i != 4 && i != 10 && sd > 0.0 && sd < 0.14*scl[i] + 0.02){\n            float pr_ = length(pd);\n            float pa  = atan(pd.y, pd.x);\n            float NT  = 11.0;\n            float taf = (pa/TAU + 0.5)*NT;\n            for (int kk = -1; kk <= 1; kk++){\n                float tid   = mod(floor(taf) + float(kk), NT);\n                float baseA = ((tid + 0.5)/NT - 0.5)*TAU;    // same [-PI,PI] frame as pa\n                float isLong = step(0.45, h11(tid*1.3 + fi*2.1));   // long tentacle vs short finger\n                float tLen  = mix(0.030, 0.11, isLong)*scl[i]*(0.8 + 0.4*h11(tid*3.7 + fi));\n                if (sd < tLen){\n                    float ph   = sd/tLen;                          // 0 base .. 1 tip\n                    float wamp = mix(0.06, 0.18, isLong)*wiggle;\n                    float wig  = (0.02 + wamp*ph)\n                               * sin(ph*mix(10.0, 6.0, isLong) - tt*mix(6.5, 4.0, isLong) + tid*1.9 + fi);\n                    float arc  = (pa - baseA - wig)*pr_;           // lateral distance to centerline\n                    float tw   = (mix(0.007, 0.011, isLong) - 0.004*ph)*(0.6 + scl[i]);\n                    float m    = (1.0 - smoothstep(tw*0.5, tw, abs(arc)))*(1.0 - smoothstep(0.90, 1.0, ph));\n                    vec3  tcol = idc*1.25 + 0.18;                  // brighter than the body\n                    col = mix(col, tcol, clamp(m, 0.0, 1.0)*0.92);\n                    col += tcol*(1.0 - smoothstep(0.0, tw*1.6, abs(arc)))*0.45*(1.0 - 0.6*ph); // glow\n                    // glowing tip node on the long tentacles\n                    col += idc*1.4*isLong*(1.0 - smoothstep(0.90, 1.0, ph))*(1.0 - smoothstep(0.0, tw*1.4, abs(arc)))*ph*ph*0.6;\n                }\n            }\n        }\n\n        // ciliates + paramecia: beating hair fringe\n        if (i == 2 || i == 6 || i == 12){\n            float a2 = atan(pd.y, pd.x) - rotB;\n            float fr = (1.0 - smoothstep(0.004, 0.035, abs(sd)))\n                     * (0.5 + 0.5*sin(a2*26.0 + tt*2.5));\n            col += fr*idc*0.35;\n        }\n\n        if (i == 1 || i == 5 || i == 13){\n            vec2 vn = vel[i]/(length(vel[i]) + 1e-4);\n            vec2 vp = vec2(-vn.y, vn.x);\n            float bodyR = 0.17*scl[i];\n            for (int s = 1; s <= 5; s++){\n                float fs = float(s)/5.0;\n                vec2 tp2 = cs[i] - vn*(bodyR*0.8 + fs*0.45*scl[i])\n                         + vp*0.05*scl[i]*sin(fs*9.0 - tt*7.0)*fs;\n                float td2 = dot(p - tp2, p - tp2);\n                col += idc*exp(-td2*9000.0)*(1.0 - fs)*0.8*max(scl[i], 0.0);\n            }\n        }\n    }\n\n    // === offspring: small children trailing the largest organisms ===\n    for (int ps = 0; ps < 5; ps++){\n        vec2 pC; vec2 pV; float pScl; vec3 pcol;\n        if (ps == 0)      { pC = cs[0];  pV = vel[0];  pScl = scl[0];  pcol = idColor(0.0);  }\n        else if (ps == 1) { pC = cs[7];  pV = vel[7];  pScl = scl[7];  pcol = idColor(7.0);  }\n        else if (ps == 2) { pC = cs[8];  pV = vel[8];  pScl = scl[8];  pcol = idColor(8.0);  }\n        else if (ps == 3) { pC = cs[9];  pV = vel[9];  pScl = scl[9];  pcol = idColor(9.0);  }\n        else              { pC = cs[11]; pV = vel[11]; pScl = scl[11]; pcol = idColor(11.0); }\n        float fps = float(ps);\n        vec2 pn = pV/(length(pV) + 1e-4);      // parent heading\n        vec2 pp = vec2(-pn.y, pn.x);\n        for (int ch = 0; ch < 3; ch++){\n            float fch = float(ch);\n            float trail = (0.14 + fch*0.075)*(0.55 + pScl);        // strung out behind parent\n            vec2 cc = pC - pn*trail\n                    + pp*0.06*(0.55 + pScl)*sin(fch*2.1 - tt*1.6)   // weaving follow\n                    + 0.018*vec2(sin(tt*2.0 + fch*3.0 + fps), cos(tt*1.7 + fch + fps));\n            vec2 dch = p - cc;\n            float dch2 = dot(dch, dch);\n            if (dch2 > 0.045) continue;                    // group guard (child + grandchildren)\n            float rch = (0.045 + 0.016*h11(fch + fps*3.0))*(0.5 + pScl);   // small\n            vec3 childCol = pcol;                           // inherits parent color\n            if (dch2 < 0.020){\n                // oblong, noisy irregular blob (not a clean rounded star)\n                float chAng = h11(fch*1.7 + fps*3.0)*TAU + tt*0.3;        // slowly turning long axis\n                vec2  e1 = vec2(cos(chAng), sin(chAng));\n                vec2  lp = vec2(dot(dch, e1)/0.68, dot(dch, vec2(-e1.y, e1.x)));  // stretch = oblong\n                float a  = atan(lp.y, lp.x);\n                float r  = length(lp);\n                float wob = rch*(0.13*sin(a*3.0 + tt*1.2 + fch)\n                          + 0.18*(vnoise(vec2(cos(a), sin(a))*2.3 + fch*4.0 + fps*2.0 + tt*0.5) - 0.5));\n                float sdc = r - (rch + wob);\n                float ins = 1.0 - smoothstep(-0.004, 0.004, sdc);\n                col = mix(col, childCol*0.45 + 0.10, ins*0.85);           // translucent cytoplasm\n                float nm = 1.0 - smoothstep(0.0, rch*0.38, length(dch));  // tiny nucleus\n                col = mix(col, childCol*1.5, ins*nm*0.85);\n                float rim = 1.0 - smoothstep(0.0, 0.006, abs(sdc));       // membrane\n                col += rim*(childCol*0.9 + 0.2)*0.5;\n                col += exp(-max(sdc, 0.0)*13.0)*0.05*childCol;            // halo\n                // children emit tiny colored sand grains too (same FX as parents)\n                for (int gi = 0; gi < 6; gi++){\n                    float fg   = float(gi);\n                    float seed = h11(fg*13.1 + fch*4.0 + fps*9.0);\n                    float rate = 0.28 + 0.30*h11(fg*3.1 + fps);\n                    float lt   = fract(tt*rate + seed);\n                    float ang  = fg/6.0*TAU + lt*0.6*(seed - 0.5) + 0.12*sin(tt*1.3 + fg);\n                    float rad  = rch*0.85 + lt*(0.05 + 0.04*h11(fg*7.1 + fps));\n                    vec2  gp   = cc + rad*vec2(cos(ang), sin(ang));\n                    float dd   = length(p - gp);\n                    float sz   = (0.0022 + 0.0026*h11(fg*9.7 + fps))*(1.0 - 0.4*lt);\n                    float fade = (1.0 - lt)*smoothstep(0.0, 0.12, lt)*emit;\n                    float core = 1.0 - smoothstep(sz*0.4, sz, dd);\n                    float halo = exp(-dd*dd*9000.0);\n                    col += sandColor(h11(fg*1.9 + fps*0.7) + 0.05*fch + 0.2)*1.5\n                         * (core*0.9 + halo*0.35)*fade;\n                }\n            }\n            // grandchildren: two even-smaller cells trailing each child\n            for (int g2 = 0; g2 < 2; g2++){\n                float fg2 = float(g2);\n                float gtrail = rch*(1.7 + fg2*1.15);\n                vec2  gcc = cc - pn*gtrail + pp*rch*0.7*sin(fg2*2.3 - tt*2.2 + fch);\n                vec2  dg = p - gcc;\n                float rg = rch*0.42;\n                if (dot(dg, dg) < rg*rg*4.5){\n                    float ag = atan(dg.y, dg.x);\n                    float wg = rg*(0.18*sin(ag*3.0 + tt*1.5 + fg2)\n                             + 0.16*(vnoise(vec2(cos(ag), sin(ag))*2.5 + fg2*7.0 + fch*3.0 + tt*0.6) - 0.5));\n                    float sdg = length(dg) - (rg + wg);\n                    float insg = 1.0 - smoothstep(-0.003, 0.003, sdg);\n                    col = mix(col, childCol*0.5 + 0.10, insg*0.8);\n                    float nmg = 1.0 - smoothstep(0.0, rg*0.45, length(dg));\n                    col = mix(col, childCol*1.5, insg*nmg*0.8);\n                    float rimg = 1.0 - smoothstep(0.0, 0.0045, abs(sdg));\n                    col += rimg*(childCol*0.85 + 0.2)*0.45;\n                }\n            }\n        }\n    }\n\n    // === digital alien organisms: blocky glitch cells that continuously\n    //     diffuse shrinking mini-copies of themselves ===\n    for (int di = 0; di < 6; di++){\n        float fdi = float(di);\n        vec2 dc = digiPath(fdi + 60.0, tt);\n        vec2 ddp = p - dc;\n        if (dot(ddp, ddp) > 0.055) continue;             // group guard (body + spores)\n        float dscl = 0.055 + 0.035*h11(fdi*3.1);         // small organisms\n        vec3 dcol = digiColor(h11(fdi*1.9) + tt*0.02);   // shifting neon color\n\n        // --- body: rotating pixelated glitch cell with circuit traces ---\n        if (dot(ddp, ddp) < dscl*dscl*3.2){\n            float rspin = tt*0.4*(h11(fdi*7.0) - 0.5)*2.0;\n            vec2 q2 = rot(ddp, rspin);\n            float a2 = atan(q2.y, q2.x);\n            // horizontal glitch displacement bands\n            float band = floor(q2.y*90.0);\n            q2.x += (step(0.82, h21(vec2(band, floor(tt*9.0)))) - 0.5)*dscl*0.28;\n            // squarish silhouette (digital), slightly noisy\n            float rr = dscl*(0.82 + 0.10*sin(a2*4.0 - rspin*2.0)\n                     + 0.06*(vnoise(vec2(cos(a2), sin(a2))*3.0 + fdi + tt*0.4) - 0.5));\n            float sd2 = length(q2) - rr;\n            float ins2 = 1.0 - smoothstep(-0.003, 0.003, sd2);\n            // voxel blocks + circuit-trace grid\n            vec2 vox = floor(q2/(dscl*0.24));\n            vec3 fill = dcol*(0.28 + 0.22*step(0.5, h21(vox)));\n            float trace = max(step(0.86, fract((q2.x/dscl)*4.0)),\n                              step(0.86, fract((q2.y/dscl)*4.0)));\n            fill += dcol*trace*0.5;\n            float scan = 0.8 + 0.2*step(0.5, fract(q2.y*140.0 - tt*6.0));\n            col = mix(col, fill*scan, ins2*0.92);\n            col += dcol*(1.0 - smoothstep(0.0, dscl*0.30, length(ddp)))*0.9;  // data core\n            float rim2 = 1.0 - smoothstep(0.0, 0.004, abs(sd2));              // wireframe rim\n            col += rim2*(dcol + 0.15)*0.75;\n        }\n\n        // --- diffusion: shed mini-copies that drift out, shrink, vanish ---\n        for (int sp = 0; sp < 5; sp++){\n            float fsp  = float(sp);\n            float seed = h11(fsp*7.3 + fdi*4.0);\n            float lt   = fract(tt*(0.28 + 0.20*seed) + seed);\n            float ang  = fsp/5.0*TAU + seed*TAU + lt*0.5*(seed - 0.5);\n            float rad  = dscl*1.1 + lt*(0.06 + 0.05*h11(fsp*3.1 + fdi));\n            vec2  spc  = dc + rad*vec2(cos(ang), sin(ang));\n            vec2  dsp  = p - spc;\n            float rsp  = dscl*0.42*(1.0 - lt)*(1.0 - lt);      // scale tiny → gone\n            if (dot(dsp, dsp) < rsp*rsp*5.0 && rsp > 0.0015){\n                float a3  = atan(dsp.y, dsp.x);\n                float sd3 = length(dsp) - rsp*(0.85 + 0.15*sin(a3*4.0 + tt*3.0));\n                float in3 = 1.0 - smoothstep(-0.002, 0.002, sd3);\n                col = mix(col, dcol*0.4, in3*0.8);                        // mini blocky body\n                col += dcol*(1.0 - smoothstep(0.0, rsp*0.55, length(dsp)))*0.7*(1.0 - lt); // core\n                col += (1.0 - smoothstep(0.0, 0.0035, abs(sd3)))*dcol*0.5*(1.0 - lt); // rim\n            }\n        }\n    }\n\n    // === digital viruses ===\n    for (int v = 0; v < 8; v++){\n        float fv = float(v);\n        vec2 drift = vec2((h11(fv*3.7 + 11.0) - 0.5)*1.7, (h11(fv*8.1 + 4.0) - 0.5)*1.3)\n                   + 0.30*vec2(sin(tt*0.20 + fv*2.6), cos(tt*0.17 + fv*1.9));\n        float aa = tt*(0.3 + 0.2*h11(fv*5.5)) + fv*TAU/8.0;\n        vec2 attach = tCen + (0.17*tScl + 0.06 + 0.02*sin(tt*1.5 + fv))*vec2(cos(aa), sin(aa));\n        vec2 vp2 = mix(drift, attach, infW);\n        vec2 vd = p - vp2;\n        if (dot(vd, vd) > 0.0014) continue;\n        float spin = tt*(0.6 + 0.4*h11(fv*9.1))*mix(-1.0, 1.0, step(0.5, h11(fv*3.3)));\n        vec2 vdr = rot(vd, spin);              // internal structure counter-rotates\n        float vr = length(vdr);\n        float vang = atan(vdr.y, vdr.x);\n        vec3 vc = mix(vec3(0.20, 1.00, 0.45), vec3(1.00, 0.22, 0.85), step(0.5, h11(fv*1.3)));\n        vec3 hot = mix(vc, vec3(1.0), 0.65);   // hot highlight tint\n        vec3 acc = mix(vc.zxy, vec3(0.6, 0.9, 1.0), 0.4);  // cyan/opposing accent\n\n        // ---- realistic + sci-fi virion ----\n        float pulseV = 1.0 + 0.06*sin(tt*3.0 + fv*2.2);\n        float rCap = 0.011*pulseV;\n\n        // 12 receptor spikes: thin stem + bulbed glycoprotein head\n        float NA = 12.0;\n        float sid = floor((vang/TAU + 0.5)*NA);\n        float scen = (sid + 0.5)/NA*TAU;\n        vec2 sdir = vec2(cos(scen), sin(scen));\n        float along  = dot(vdr, sdir);\n        float across = dot(vdr, vec2(-sdir.y, sdir.x));\n        float stem = (1.0 - smoothstep(0.0018, 0.0040, abs(across)))\n                   * smoothstep(rCap*0.80, rCap*1.0, along)\n                   * (1.0 - smoothstep(rCap*1.46, rCap*1.66, along));\n        float hd = length(vdr - sdir*rCap*1.62);\n        float head = 1.0 - smoothstep(0.0038, 0.0072, hd);   // receptor bulb\n        float headGlow = exp(-hd*hd*22000.0);                 // soft halo per knob\n\n        // icosahedral capsid: filled disc, faceted shading, capsomere knobs\n        float capMask = 1.0 - smoothstep(rCap*0.88, rCap, vr);\n        float shell   = 1.0 - smoothstep(0.0016, 0.0040, abs(vr - rCap));\n        float facet   = 0.62 + 0.38*cos(5.0*vang);                        // 5-fold facets\n        float capsomere = 0.62 + 0.38*sin(vang*11.0)*sin(vr*300.0 - spin*2.0);\n        // coiled genome strand + bright nucleoid core\n        float genome = capMask*(0.5 + 0.5*sin(vr*240.0 - tt*3.0))\n                     *(1.0 - smoothstep(rCap*0.48, rCap*0.72, vr));\n        float core   = 1.0 - smoothstep(0.0, rCap*0.26, vr);\n        // sci-fi: energy corona, holo scan-ring, digital scanlines\n        float corona = exp(-vr*vr*1500.0)*(0.55 + 0.45*sin(tt*4.0 + fv*2.0));\n        float holo   = (1.0 - smoothstep(0.0009, 0.0024, abs(vr - rCap*1.95)))\n                     * (0.5 + 0.5*cos(vang*24.0 - tt*3.0));\n        float scan   = 0.86 + 0.14*sin(vdr.y*820.0 - tt*8.0);\n\n        col = mix(col, vec3(0.02, 0.05, 0.03),\n                  (1.0 - smoothstep(rCap*1.0, rCap*1.22, vr))*(1.0 - capMask)*0.45);\n        col = mix(col, vc*facet*capsomere*scan, capMask*0.90);\n        col = mix(col, acc*0.55, genome*0.60);\n        col += hot*core*0.85;\n        col = mix(col, hot, clamp(shell*facet, 0.0, 1.0)*0.95);\n        col += vc*stem*0.90;\n        col += vc*headGlow*0.55;\n        col += hot*head*1.40;\n        col += acc*holo*0.38;\n        col += vc*corona*0.45;\n        col += vec3(1.0)*core*(1.0 - smoothstep(0.0, rCap*0.12, vr))*0.9;\n    }\n\n    // === evil sharp mecha-centipedes (half size, five of them) ===\n    for (int b = 0; b < 5; b++){\n        float fb = float(b) + 30.0;\n        vec2 head = bugPath(fb, tt);\n        vec2 hn = (head - bugPath(fb, tt - 0.2));\n        hn = hn/(length(hn) + 1e-4);                    // heading\n        vec2 hp = vec2(-hn.y, hn.x);                    // lateral\n        float SP = 0.031;                               // segment spacing (half)\n        vec2 mid = head - hn*(4.5*SP);\n        if (dot(p - mid, p - mid) > 0.045) continue;    // body bounding cull\n        // colorful alloy: varied palette per centipede (like the organisms), bright spine\n        vec3 bc   = sandColor(h11(fb*2.3) + 0.13)*1.05;\n        vec3 hotc = mix(bc, vec3(1.0), 0.55);              // bright emissive spine\n\n        for (int s = 0; s < 9; s++){\n            float fs = float(s);\n            vec2 seg = head - hn*(fs*SP) + hp*0.018*sin(fs*0.75 - tt*4.0);\n            vec2 ps = p - seg;\n            if (dot(ps, ps) < 0.0020){\n                float rseg = 0.019*(1.0 - 0.5*fs/9.0);   // taper to tail\n                // SHARP angular segment: elongated rhombus (diamond), not a disc\n                vec2 bf = vec2(dot(ps, hn), dot(ps, hp));\n                float dia = abs(bf.x)*0.65 + abs(bf.y);\n                float body = 1.0 - smoothstep(rseg*0.78, rseg, dia);\n                float plate = 0.55 + 0.45*sin(fs*1.7 + tt*2.0);\n                col = mix(col, bc*plate, body*0.95);\n                // pulsing iridescent alien node in each segment (shifting color)\n                vec3 alienCore = digiColor(fs*0.12 + tt*0.5 + fb);\n                col += alienCore*(1.0 - smoothstep(0.0, rseg*0.42, dia))*0.90;\n                col = mix(col, vec3(0.02,0.0,0.03),\n                          (1.0 - smoothstep(rseg*0.90, rseg*1.10, dia))*(1.0 - body)*0.6); // dark rim\n                // jointed, curved alien legs with glowing feet (asymmetric sweep)\n                float legph = sin(fs*0.75 - tt*6.0);\n                vec2 k1 = seg + hp*(rseg + 0.012) - hn*0.002 + hn*legph*0.010;\n                vec2 t1 = k1 + hp*0.014 - hn*(0.012 - legph*0.008);\n                vec2 k2 = seg - hp*(rseg + 0.012) - hn*0.002 - hn*legph*0.010;\n                vec2 t2 = k2 - hp*0.014 - hn*(0.012 + legph*0.008);\n                float lw = 0.0012;\n                col += bc*0.85*(1.0 - smoothstep(lw, lw*2.0,\n                        min(segd(p, seg + hp*rseg*0.5, k1), segd(p, k1, t1))));\n                col += bc*0.85*(1.0 - smoothstep(lw, lw*2.0,\n                        min(segd(p, seg - hp*rseg*0.5, k2), segd(p, k2, t2))));\n                col += alienCore*(1.0 - smoothstep(0.0, 0.0024, length(p - t1)))*0.7; // glowing foot\n                col += alienCore*(1.0 - smoothstep(0.0, 0.0024, length(p - t2)))*0.7;\n            }\n        }\n        // tail stinger: sharp spike off the last segment\n        vec2 tb = head - hn*(8.0*SP);\n        vec2 tt2 = head - hn*(8.0*SP) - hn*0.022;\n        col += hotc*(1.0 - smoothstep(0.0010, 0.0028, segd(p, tb, tt2)));\n        col += vec3(1.0,0.3,0.15)*(1.0 - smoothstep(0.0, 0.003, length(p - tt2)))*0.7;\n\n        // menacing head: armor + two red eyes + sharp mandible fangs\n        float dh = length(p - head);\n        if (dh < 0.055){\n            float rH = 0.020;\n            vec2 bfh = vec2(dot(p - head, hn), dot(p - head, hp));\n            float diaH = abs(bfh.x)*0.7 + abs(bfh.y);                     // angular head\n            col = mix(col, bc*1.15, (1.0 - smoothstep(rH*0.85, rH, diaH))*0.95);\n            vec3 alienEye = digiColor(tt*0.4 + fb*1.3);       // iridescent alien eyes\n            col += alienEye*(1.0 - smoothstep(0.0, rH*0.5, diaH))*0.35;\n            // alien three-eye cluster\n            col += alienEye*(1.0 - smoothstep(0.0, 0.006, length(p - head - hn*0.006 - hp*0.007)))*1.3;\n            col += alienEye*(1.0 - smoothstep(0.0, 0.006, length(p - head - hn*0.006 + hp*0.007)))*1.3;\n            col += alienEye*(1.0 - smoothstep(0.0, 0.005, length(p - head - hn*0.014)))*1.1;   // front eye\n            // two curved feelers sweeping back + two forward mandibles\n            for (int fl = 0; fl < 2; fl++){\n                float sd2 = (fl == 0) ? 1.0 : -1.0;\n                vec2 f0 = head + hp*sd2*rH*0.6;\n                vec2 fk = head + hp*sd2*rH*1.3 - hn*0.006 + hn*sin(tt*3.0 + sd2)*0.005;\n                vec2 ft = fk + hp*sd2*rH*0.6 + hn*0.012;\n                col += bc*0.7*(1.0 - smoothstep(0.0010, 0.0026,\n                        min(segd(p, f0, fk), segd(p, fk, ft))));\n                col += alienEye*(1.0 - smoothstep(0.0, 0.003, length(p - ft)))*0.6;   // feeler tip\n                vec2 mb = head + hn*rH*0.7 + hp*sd2*rH*0.55;\n                vec2 mt = head + hn*rH*2.1 + hp*sd2*rH*0.15;\n                col += vec3(0.9, 0.95, 0.95)*(1.0 - smoothstep(0.0011, 0.0026, segd(p, mb, mt)))*0.85;\n                col += vec3(0.9,1.0,1.0)*(1.0 - smoothstep(0.0, 0.0022, length(p - mt)))*0.6; // fang tip\n            }\n        }\n        vec2 wk = head - hn*(9.5*SP);\n        col += bc*exp(-dot(p - wk, p - wk)*9000.0)*0.12;\n    }\n\n    // === feeding stream (slow siphon) ===\n    if (feedW > 0.001 && segd(p, vicC, cs[0]) < 0.10){\n        vec3 pcol = idColor(vic);\n        vec2 fdir = cs[0] - vicC;\n        vec2 fperp = vec2(-fdir.y, fdir.x)/(length(fdir) + 1e-4);\n        for (int n = 0; n < 6; n++){\n            float s = fract(tt*0.9 + float(n)/6.0);\n            vec2 sp2 = mix(vicC, cs[0], s) + fperp*0.02*sin(s*18.0 + tt*2.0);\n            float dd = dot(p - sp2, p - sp2);\n            col += pcol*exp(-dd*4500.0)*feedW*(1.0 - s)*1.3;\n        }\n        col += pcol*exp(-segd(p, vicC, cs[0])*segd(p, vicC, cs[0])*2500.0)*feedW*0.25;\n    }\n\n    // === symbiosis link ===\n    {\n        float linkM = clamp(scl[4]/0.60, 0.0, 1.0)*clamp(scl[5]/0.42, 0.0, 1.0);\n        float ld = segd(p, cs[4], cs[5]);\n        if (ld < 0.10 && linkM > 0.001){\n        col += vec3(0.30, 0.90, 0.60)*exp(-ld*ld*3000.0)*(0.30 + 0.20*sin(tt*5.0))*linkM;\n        vec2 sdir = cs[5] - cs[4];\n        vec2 sperp = vec2(-sdir.y, sdir.x)/(length(sdir) + 1e-4);\n        for (int n = 0; n < 4; n++){\n            float fn = float(n);\n            float s1 = fract(tt*0.9 + fn*0.25);\n            vec2 g1 = mix(cs[4], cs[5], s1) + sperp*0.015*sin(s1*15.0 + tt*4.0);\n            col += idColor(4.0)*exp(-dot(p - g1, p - g1)*7000.0)*0.8*linkM;\n            float s2 = fract(-tt*0.8 + fn*0.25 + 0.12);\n            vec2 g2 = mix(cs[4], cs[5], s2) - sperp*0.015*sin(s2*15.0 + tt*4.0);\n            col += idColor(5.0)*exp(-dot(p - g2, p - g2)*7000.0)*0.8*linkM;\n        }\n        }   // end link proximity guard\n    }\n\n    // division bridge (cytokinesis): glowing strand between parent and daughter\n    {\n        float bw = smoothstep(0.22, 0.32, dphase)*(1.0 - smoothstep(0.50, 0.62, dphase));\n        if (bw > 0.001){\n            vec2 dvC = cs[1];\n            for (int i = 1; i < 14; i++){ if (abs(float(i) - divF) < 0.5) dvC = cs[i]; }\n            float bd2 = segd(p, dvC, cs[14]);\n            if (bd2 < 0.08){\n                col += idColor(divF)*exp(-bd2*bd2*4000.0)*bw*0.7;\n            }\n        }\n    }\n\n    col += flash*0.22*vec3(1.0, 0.88, 0.60);\n\n    // === full-screen digital overlay (no lens circle) ===\n    float ret = 0.0;\n    ret = max(ret, (1.0 - smoothstep(0.0012, 0.0030, abs(pl.x)))*0.30);  // crosshair\n    ret = max(ret, (1.0 - smoothstep(0.0012, 0.0030, abs(pl.y)))*0.30);\n    vec2 gcell = abs(fract(pl/0.15) - 0.5)*0.15;                          // fine grid\n    ret = max(ret, (1.0 - smoothstep(0.0006, 0.0018, min(gcell.x, gcell.y)))*0.10);\n    col += vec3(0.35, 0.95, 0.75)*ret*0.10;\n\n    col *= 0.97 + 0.03*sin(uv.y*RENDERSIZE.y*3.14159);   // scanlines\n    col *= 1.0 + 0.01*(h11(floor(TIME*12.0)) - 0.5);      // sensor flicker\n    col *= 1.0 - 0.10*dot(pl*0.42, pl*0.42);              // very mild vignette\n    col += (h21(gl_FragCoord.xy + fract(tt)) - 0.5)*0.02; // sensor grain\n\n    gl_FragColor = vec4(col, 1.0);\n}\n",
    "generator": {
      "model": "claude-fable-5",
      "provider": null,
      "prompt": null,
      "params": null
    }
  }
}