{
  "license": "CC0-1.0",
  "shader": {
    "id": "6qapphkp",
    "title": "live coder (first person)",
    "license": "CC0-1.0",
    "provenance_type": "witnessed_generation",
    "made_with": "glslop studio",
    "status": "active",
    "compile_ok": true,
    "render_hash": "c0fefe064e0a0000",
    "tags": [
      "scene",
      "interactive",
      "livecoding",
      "raytraced",
      "generative",
      "funny"
    ],
    "parents": [],
    "author": "zazi5inxhmgi",
    "author_name": "ufffd",
    "author_url": "/u/ufffd",
    "created_at": "2026-11-20T03:53:32.799Z",
    "poster_url": "/posters/6qapphkp.avif",
    "stats": {
      "slops": 1,
      "views": 152,
      "forks": 0
    },
    "self": "/api/v1/shaders/6qapphkp",
    "isf": "/*{\n  \"DESCRIPTION\": \"first person: live coding at night, banging on the keyboard while the screen draws weird shapes under the code. turn fury past 2/3 and every so often he headbutts the keyboard three times. drag to steer his gaze.\",\n  \"CREDIT\": \"made in glslop studio\",\n  \"CATEGORIES\": [\"scene\", \"generative\", \"interactive\"],\n  \"INPUTS\": [\n    { \"NAME\": \"look\", \"TYPE\": \"point2D\", \"DEFAULT\": [0.5, 0.5], \"LABEL\": \"gaze (drag)\" },\n    { \"NAME\": \"tempo\", \"TYPE\": \"float\", \"DEFAULT\": 1.0, \"MIN\": 0.2, \"MAX\": 3.0, \"LABEL\": \"typing tempo\" },\n    { \"NAME\": \"fury\", \"TYPE\": \"float\", \"DEFAULT\": 0.45, \"MIN\": 0.0, \"MAX\": 1.0, \"LABEL\": \"fury\" },\n    { \"NAME\": \"glances\", \"TYPE\": \"float\", \"DEFAULT\": 0.6, \"MIN\": 0.0, \"MAX\": 1.0, \"LABEL\": \"glances down\" },\n    { \"NAME\": \"vibe\", \"TYPE\": \"float\", \"DEFAULT\": 0.0, \"MIN\": 0.0, \"MAX\": 1.0, \"LABEL\": \"screen palette\" },\n    { \"NAME\": \"lamp\", \"TYPE\": \"float\", \"DEFAULT\": 0.7, \"MIN\": 0.0, \"MAX\": 1.0, \"LABEL\": \"desk lamp\" }\n  ]\n}*/\n\n#define PI 3.14159265\n\nfloat h11(float p) { p = fract(p * 0.1031); p *= p + 33.33; p *= p + p; return fract(p); }\nfloat h21(vec2 p) { vec3 q = fract(vec3(p.xyx) * 0.1031); q += dot(q, q.yzx + 33.33); return fract((q.x + q.y) * q.z); }\nfloat n11(float x) { float i = floor(x), f = fract(x); f = f * f * (3.0 - 2.0 * f); return mix(h11(i), h11(i + 1.0), f) * 2.0 - 1.0; }\nvec3 pal(float t) { return 0.5 + 0.5 * cos(6.28318 * (t + vec3(0.0, 0.33, 0.67))); }\nmat2 rot(float a) { float c = cos(a), s = sin(a); return mat2(c, -s, s, c); }\n\n// ray vs axis-aligned ellipsoid centred at the origin; -1 on a miss\nfloat eHit(vec3 o, vec3 d, vec3 r) {\n  vec3 oc = o / r, dc = d / r;\n  float a = dot(dc, dc), b = dot(oc, dc), c = dot(oc, oc) - 1.0;\n  float h = b * b - a * c;\n  if (h < 0.0) return -1.0;\n  return (-b - sqrt(h)) / a;\n}\n\n// ray vs box; -1 on a miss. nrm = the face normal that was hit\nfloat bHit(vec3 o, vec3 d, vec3 bmin, vec3 bmax, out vec3 nrm) {\n  vec3 inv = 1.0 / d;\n  vec3 t0 = (bmin - o) * inv, t1 = (bmax - o) * inv;\n  vec3 tn3 = min(t0, t1), tf3 = max(t0, t1);\n  float tn = max(max(tn3.x, tn3.y), tn3.z), tf = min(min(tf3.x, tf3.y), tf3.z);\n  nrm = -sign(d) * step(tn3.yzx, tn3.xyz) * step(tn3.zxy, tn3.xyz);\n  return (tn > tf || tn < 0.0) ? -1.0 : tn;\n}\n\n// ray vs capsule from pa to pb (after iq); -1 on a miss\nfloat capHit(vec3 ro, vec3 rd, vec3 pa, vec3 pb, float r) {\n  vec3 ba = pb - pa, oa = ro - pa;\n  float baba = dot(ba, ba), bard = dot(ba, rd), baoa = dot(ba, oa), rdoa = dot(rd, oa), oaoa = dot(oa, oa);\n  float a = baba - bard * bard, b = baba * rdoa - baoa * bard, c = baba * oaoa - baoa * baoa - r * r * baba;\n  float h = b * b - a * c;\n  if (h >= 0.0) {\n    float t = (-b - sqrt(h)) / a;\n    float y = baoa + t * bard;\n    if (y > 0.0 && y < baba) return t;\n    vec3 oc = y <= 0.0 ? oa : ro - pb;\n    b = dot(rd, oc); c = dot(oc, oc) - r * r; h = b * b - c;\n    if (h > 0.0) return -b - sqrt(h);\n  }\n  return -1.0;\n}\n\n// cables (monitor to tower, keyboard to tower, lamp to wall) and the lamp's arm, as capsules\nvoid seg(int i, out vec3 a, out vec3 b, out float r) {\n  r = 0.0055;\n  if (i == 0) { a = vec3(0.0, 0.09, 0.615); b = vec3(0.02, 0.006, 0.7); }\n  else if (i == 1) { a = vec3(0.02, 0.006, 0.7); b = vec3(0.3, 0.006, 0.9); }\n  else if (i == 2) { a = vec3(0.3, 0.006, 0.9); b = vec3(0.62, 0.006, 0.92); }\n  else if (i == 3) { a = vec3(0.62, 0.006, 0.92); b = vec3(0.69, 0.12, 0.8); }\n  else if (i == 4) { a = vec3(0.04, 0.012, 0.222); b = vec3(0.07, 0.006, 0.5); r = 0.0045; }\n  else if (i == 5) { a = vec3(0.07, 0.006, 0.5); b = vec3(0.2, 0.006, 0.85); r = 0.0045; }\n  else if (i == 6) { a = vec3(0.2, 0.006, 0.85); b = vec3(0.67, 0.05, 0.82); r = 0.0045; }\n  else if (i == 7) { a = vec3(-0.62, 0.012, 0.62); b = vec3(-0.6, 0.3, 0.68); r = 0.008; }\n  else if (i == 8) { a = vec3(-0.6, 0.3, 0.68); b = vec3(-0.48, 0.415, 0.51); r = 0.008; }\n  else { a = vec3(-0.62, 0.006, 0.66); b = vec3(-0.25, 0.006, 0.95); }\n}\n\n// typing clock, shared by the hands, the keyboard and the screen\nfloat gTyped;   // characters typed so far\nfloat gLine;    // index of the line being typed\nfloat gCol;     // ticks into that line (he stops to think once the line is done)\nfloat gTyping;  // 1 while actually typing\nvec3 gHand0, gHand1;\nfloat gSlam, gDown, gFlash, gImpK, gSlamCyc; // the headbutt: how far into it, head down, key flash\n\nfloat lineLen(float id) { return 6.0 + floor(h11(id * 1.37 + 0.5) * 22.0); }\nfloat lineIndent(float id) { return 2.0 * floor(h11(id * 2.71 + 0.2) * 3.0); }\n\n// lift then slam: rises slowly, comes down fast\nfloat slam(float ph) { return smoothstep(0.0, 1.0, min(ph / 0.7, (1.0 - ph) / 0.3)); }\n\n// the scene's ellipsoids: two hands (palm, four fingers, a hoodie forearm), a rubber duck, a mouse\nvoid part(int i, out vec3 c, out vec3 r) {\n  if (i < 12) {\n    float h = i < 6 ? 0.0 : 1.0;\n    float k = float(i) - h * 6.0;\n    float side = h * 2.0 - 1.0;\n    vec3 base = h < 0.5 ? gHand0 : gHand1;\n    if (k < 0.5) { c = base; r = vec3(0.046, 0.018, 0.05); }\n    else if (k < 4.5) {\n      float f = k - 2.5;\n      float tap = max(0.0, sin(gTyped * 2.3 + k * 1.7 + h * 3.1)) * 0.014 * (0.4 + fury) * gTyping;\n      c = base + vec3(f * 0.021, -0.016 + tap, 0.058 - abs(f) * 0.007);\n      r = vec3(0.0095, 0.009, 0.028);\n    } else { c = base + vec3(side * 0.03, 0.03, -0.25); r = vec3(0.05, 0.043, 0.22); }\n  }\n  else if (i == 12) { c = vec3(-0.47, 0.032, 0.40); r = vec3(0.042, 0.032, 0.036); }\n  else if (i == 13) { c = vec3(-0.47, 0.078, 0.385); r = vec3(0.024); }\n  else if (i == 14) { c = vec3(0.36, 0.0, 0.11); r = vec3(0.032, 0.02, 0.055); }\n  else if (i == 15) { c = vec3(-0.47, 0.39, 0.49); r = vec3(0.065, 0.04, 0.065); }\n  else { c = vec3(-0.62, 0.008, 0.62); r = vec3(0.06, 0.011, 0.06); }\n}\n\n// what's on the monitor: s in [0,1]^2\nvec3 screenContent(vec2 s) {\n  float T = TIME;\n  vec2 q = (s - 0.5) * vec2(1.77, 1.0);\n  vec3 col = vec3(0.015, 0.012, 0.03);\n  col += 0.025 * pal(vibe + 0.5 + length(q) * 0.6 - T * 0.05) * (0.5 + 0.5 * sin(length(q - vec2(0.3 * sin(T * 0.2), 0.0)) * 40.0 - T * 2.0));\n\n  // the sketch: shapes change every two lines of code, like re-evaluating it\n  float era = floor(gLine / 2.0);\n  for (int i = 0; i < 6; i++) {\n    float fi = float(i);\n    float seed = fi * 7.13 + era * 3.71;\n    vec2 c = vec2(sin(T * (0.31 + 0.11 * fi) + fi * 2.1) * 0.6, cos(T * (0.23 + 0.07 * fi) + fi * 1.3) * 0.3);\n    vec2 lq = rot(T * (h11(seed) - 0.5) * 2.0 + fi) * (q - c);\n    float sz = (0.06 + 0.08 * h11(seed + 1.0)) * (1.0 + 0.25 * sin(T * 3.0 + fi * 1.7));\n    float kind = h11(seed + 2.0);\n    float d;\n    if (kind < 0.33) d = length(lq) - sz;\n    else if (kind < 0.66) d = max(abs(lq.x), abs(lq.y)) - sz * 0.85;\n    else d = length(lq) - sz * (0.75 + 0.3 * cos(5.0 * atan(lq.y, lq.x) + T * 2.0));\n    vec3 sc = pal(vibe + h11(seed + 3.0) * 0.7 + T * 0.02);\n    float ring = step(0.5, h11(seed + 4.0));\n    float fill = mix(smoothstep(0.004, -0.004, d), smoothstep(0.012, 0.0, abs(d) - 0.006), ring);\n    col = mix(col, sc, fill * 0.9);\n    col += sc * 0.002 / (abs(d) + 0.004);\n  }\n\n  // the code, hydra style: dark bands behind each line, cursor on the line being typed\n  float rowH = 1.0 / 11.0, cw = rowH * 0.48;\n  vec2 tp = vec2(s.x * 1.77 - 0.05, (1.0 - s.y) - 0.04);\n  float row = floor(tp.y / rowH), ci = floor(tp.x / cw);\n  vec2 f = vec2(fract(tp.x / cw), fract(tp.y / rowH));\n  float cur = 9.0;\n  float lid = gLine - (cur - row);\n  if (row >= 0.0 && row <= cur && lid >= 0.0 && tp.x > 0.0) {\n    float len = lineLen(lid), ind = lineIndent(lid);\n    bool isCur = abs(row - cur) < 0.5;\n    float shown = isCur ? min(gCol, len) : len;\n    if (ci >= ind - 1.0 && ci < ind + shown + 1.0) col = mix(col, vec3(0.0), 0.62);\n    if (ci >= ind && ci < ind + shown) {\n      float word = floor((ci - ind + floor(h11(lid) * 4.0)) / (3.0 + floor(h11(lid * 5.3) * 4.0)));\n      float space = step(h21(vec2(lid, ci) * 1.7), 0.14);\n      float code = floor(h21(vec2(lid * 13.1, ci)) * 997.0);\n      vec2 g = (f - vec2(0.2, 0.18)) / vec2(0.6, 0.64);\n      if (g.x > 0.0 && g.x < 1.0 && g.y > 0.0 && g.y < 1.0) {\n        vec2 bit = floor(g * vec2(3.0, 5.0));\n        float on = step(0.45, h11(code + bit.x * 3.1 + bit.y * 7.7));\n        float tk = h11(lid * 3.3 + word * 1.9);\n        vec3 tc = tk < 0.25 ? vec3(1.0, 0.36, 0.75) : tk < 0.45 ? vec3(0.55, 1.0, 0.45) : tk < 0.6 ? vec3(1.0, 0.72, 0.3) : vec3(0.88, 0.9, 0.95);\n        col = mix(col, tc, on * (1.0 - space));\n      }\n    }\n    if (isCur && abs(ci - (ind + shown)) < 0.5 && fract(T * 1.8) < 0.6 && f.y > 0.1 && f.y < 0.9) col = mix(col, vec3(0.9), 0.85);\n  }\n  // every second line \"evaluates\": a quick flash\n  col += vec3(0.2) * exp(-gCol * 0.9) * step(mod(gLine, 2.0), 0.5);\n  return col;\n}\n\n// soft contact shadow of the hands and forearms on the desk and keyboard\nfloat contactShadow(vec3 p) {\n  float s = 1.0;\n  for (int h = 0; h < 2; h++) {\n    vec3 b = h == 0 ? gHand0 : gHand1;\n    float side = float(h) * 2.0 - 1.0;\n    float lift = b.y - 0.05;\n    vec2 d = (p.xz - b.xz - vec2(0.0, 0.03)) / vec2(0.07, 0.09);\n    s *= 1.0 - 0.55 * exp(-dot(d, d) * 1.5) / (1.0 + lift * 30.0);\n    vec2 a = (p.xz - b.xz - vec2(side * 0.03, -0.25)) / vec2(0.07, 0.24);\n    s *= 1.0 - 0.4 * exp(-dot(a, a) * 1.5);\n  }\n  return s;\n}\n\nvoid main() {\n  float T = TIME;\n  gTyped = T * tempo * (6.0 + 6.0 * fury);\n  gLine = floor(gTyped / 30.0) + 14.0;\n  gCol = mod(gTyped, 30.0);\n  gTyping = step(gCol, lineLen(gLine));\n\n  // now and then, when fury is past 2/3: stop typing and headbutt the keyboard three times\n  float sCyc = floor(T / 15.0), lt = mod(T, 15.0) - 8.0;\n  float sOn = step(0.667, fury) * step(h11(sCyc * 5.3 + 1.0), 0.8);\n  gSlamCyc = sCyc;\n  gSlam = sOn * smoothstep(0.0, 0.4, lt) * (1.0 - smoothstep(3.2, 3.8, lt));\n  gDown = 0.0;\n  for (int k = 0; k < 3; k++) {\n    float x = lt - 0.9 - float(k) * 0.75;\n    gDown = max(gDown, x < 0.0 ? pow(smoothstep(-0.38, 0.0, x), 2.0) : 1.0 - smoothstep(0.0, 0.32, x));\n  }\n  gDown *= gSlam;\n  gImpK = clamp(floor((lt - 0.9) / 0.75), 0.0, 2.0);\n  float since = lt - 0.9 - gImpK * 0.75;\n  gFlash = sOn * step(0.0, since) * exp(-since * 4.0) * step(lt, 3.5);\n  gTyping *= 1.0 - gSlam;\n  float amp = (0.012 + 0.05 * fury) * gTyping;\n  gHand0 = vec3(-0.105, 0.05 + slam(fract(gTyped * 0.5)) * amp, 0.13);\n  gHand1 = vec3(0.105, 0.05 + slam(fract(gTyped * 0.5 + 0.5)) * amp, 0.13);\n\n  // where he looks: mostly the screen, now and then down at his hands or the mug\n  float cyc = floor(T / 6.0), ph = fract(T / 6.0);\n  float glance = smoothstep(0.62, 0.70, ph) * (1.0 - smoothstep(0.84, 0.92, ph)) * step(h11(cyc * 1.7 + 0.3), glances);\n  vec3 tScreen = vec3(n11(T * 0.27) * 0.12, 0.27 + n11(T * 0.21 + 4.0) * 0.04, 0.55);\n  vec3 tDesk = h11(cyc * 3.1) < 0.7 ? vec3(0.0, 0.03, 0.17) : vec3(0.5, 0.08, 0.34);\n  vec3 target = mix(tScreen, tDesk, glance);\n  target.xy += (look - 0.5) * vec2(1.2, 0.8);\n\n  // handheld wobble, plus a jolt on every hard keystroke\n  float jolt = gTyping * pow(1.0 - fract(gTyped), 6.0) * fury;\n  vec3 ro = vec3(n11(T * 0.6 + 2.0) * 0.01, 0.42 + n11(T * 0.8 + 7.0) * 0.008 - jolt * 0.004, -0.30);\n  target += vec3(n11(T * 1.9), n11(T * 1.6 + 3.0), 0.0) * 0.006 * (1.0 + 2.0 * fury);\n  vec3 fw = normalize(target - ro);\n\n  // headbutt pose, in the side view (y up, z forward): hips slide in, the spine leans from the hips,\n  // the neck bends from the top of the spine, and the eye rides on the head. Each hit swings the\n  // head down and forward along an arc; between hits it rears back up. At rest this is the normal eye.\n  float lean = gSlam * 0.45 + gDown * 0.29;          // spine angle from vertical\n  float neck = gSlam * 0.25 + gDown * 0.75;          // extra bend at the neck\n  vec2 hipYZ = vec2(-0.10, -0.45 + 0.12 * gSlam);\n  vec2 spine = rot(-lean) * vec2(0.43, 0.08);        // rot(-x) turns (up, forward) towards forward\n  vec2 eyeYZ = hipYZ + spine + rot(-(lean + neck)) * vec2(0.09, 0.07);\n  vec3 eyeP = vec3(n11(T * 0.6 + 2.0) * 0.01 + gFlash * 0.015 * (h11(gImpK + sCyc) - 0.5), eyeYZ.x, eyeYZ.y);\n  vec2 lookYZ = rot(-min(lean + neck, 1.35)) * normalize(vec2(-0.17, 0.98));\n  vec3 headFw = normalize(vec3((h11(gImpK * 1.7 + sCyc) - 0.5) * gFlash * 0.08, lookYZ.x, lookYZ.y));\n  ro = mix(ro, eyeP, gSlam);\n  fw = normalize(mix(fw, headFw, gSlam));\n  vec3 rt = normalize(cross(vec3(0.0, 1.0, 0.0), fw));\n  vec3 up = cross(fw, rt);\n  vec2 uv = (gl_FragCoord.xy - 0.5 * RENDERSIZE) / RENDERSIZE.y;\n  uv = rot(n11(T * 0.45 + 11.0) * 0.03 + gFlash * 0.1 * (h11(gImpK + sCyc * 3.0) - 0.5)) * uv;\n  vec3 rd = normalize(fw * 0.62 + rt * uv.x + up * uv.y);\n\n  // trace: planes, a cylinder, ellipsoids\n  float tb = 1e9, t;\n  int id = 0, hp = 0;\n  vec3 hc = vec3(0.0), hr = vec3(1.0), p;\n  if (rd.y < 0.0) {\n    t = -ro.y / rd.y; p = ro + rd * t;\n    if (p.z > -0.2 && p.z < 1.0 && abs(p.x) < 1.6) { tb = t; id = 1; }          // desk\n    t = (-0.75 - ro.y) / rd.y; if (t < tb) { tb = t; id = 2; }                // floor\n    t = (0.022 - ro.y) / rd.y; p = ro + rd * t;\n    if (abs(p.x) < 0.24 && p.z > 0.05 && p.z < 0.22 && t < tb) { tb = t; id = 7; } // keyboard top\n  }\n  if (rd.z > 0.0) {\n    t = (1.0 - ro.z) / rd.z; if (t < tb) { tb = t; id = 3; }                  // wall\n    t = (-0.2 - ro.z) / rd.z; p = ro + rd * t;\n    if (p.y > -0.045 && p.y < 0.0 && t < tb) { tb = t; id = 4; }              // desk front edge\n    t = (0.55 - ro.z) / rd.z; p = ro + rd * t;\n    if (abs(p.x) < 0.37 && p.y > 0.152 && p.y < 0.583 && t < tb) { tb = t; id = 5; } // monitor\n    t = (0.6 - ro.z) / rd.z; p = ro + rd * t;\n    if (abs(p.x) < 0.04 && p.y > 0.0 && p.y < 0.16 && t < tb) { tb = t; id = 6; }   // monitor neck\n    t = (0.05 - ro.z) / rd.z; p = ro + rd * t;\n    if (abs(p.x) < 0.24 && p.y > 0.0 && p.y < 0.022 && t < tb) { tb = t; id = 8; }  // keyboard front\n  }\n  {\n    vec2 oc = ro.xz - vec2(0.5, 0.34);\n    float a = dot(rd.xz, rd.xz), b = dot(oc, rd.xz), c = dot(oc, oc) - 0.045 * 0.045;\n    float h = b * b - a * c;\n    if (h > 0.0) {\n      float t0 = (-b - sqrt(h)) / a, y0 = ro.y + rd.y * t0;\n      if (y0 > 0.0 && y0 < 0.11 && t0 < tb) { tb = t0; id = 9; }               // mug\n      else if (y0 >= 0.11) {\n        float t1 = (0.095 - ro.y) / rd.y; vec2 m = ro.xz + rd.xz * t1 - vec2(0.5, 0.34);\n        if (dot(m, m) < 0.041 * 0.041 && t1 < tb) { tb = t1; id = 10; }         // coffee\n      }\n    }\n  }\n  vec3 tN = vec3(0.0), sa = vec3(0.0), sb = vec3(0.0);\n  float sr = 1.0;\n  {\n    vec3 bn;\n    float tbx = bHit(ro, rd, vec3(0.6, 0.0, 0.3), vec3(0.79, 0.43, 0.78), bn);\n    if (tbx > 0.0 && tbx < tb) { tb = tbx; id = 11; tN = bn; }                // computer tower\n  }\n  for (int i = 0; i < 10; i++) {\n    vec3 a, b; float r;\n    seg(i, a, b, r);\n    float tc = capHit(ro, rd, a, b, r);\n    if (tc > 0.0 && tc < tb) { tb = tc; id = 12; sa = a; sb = b; sr = r; hp = i; }   // cables, lamp arm\n  }\n  for (int i = 0; i < 17; i++) {\n    vec3 c, r;\n    part(i, c, r);\n    float te = eHit(ro - c, rd, r);\n    if (te > 0.0 && te < tb) { tb = te; id = 20; hc = c; hr = r; hp = i; }\n  }\n\n  // surfaces\n  p = ro + rd * tb;\n  vec3 n = vec3(0.0, 0.0, -1.0), alb = vec3(0.1), emit = vec3(0.0);\n  float spec = 0.0, ao = 1.0;\n  if (id == 1) {\n    n = vec3(0.0, 1.0, 0.0);\n    float grain = 0.5 + 0.5 * sin(p.x * 55.0 + sin(p.z * 9.0 + p.x * 3.0) * 4.0);\n    alb = mix(vec3(0.26, 0.15, 0.09), vec3(0.36, 0.22, 0.12), grain);\n    vec2 nb = rot(0.25) * (p.xz - vec2(-0.55, 0.12));\n    if (abs(nb.x) < 0.11 && abs(nb.y) < 0.15) {\n      alb = vec3(0.86, 0.84, 0.78);\n      if (fract(nb.y * 60.0) < 0.1) alb = vec3(0.55, 0.65, 0.85);\n      if (nb.x < -0.095) alb = vec3(0.7, 0.18, 0.2);\n      if (abs(nb.y - 0.05 + 0.02 * sin(nb.x * 90.0)) < 0.004 && nb.x > -0.06 && nb.x < 0.07) alb = vec3(0.15, 0.15, 0.3);\n    }\n    vec2 pn = rot(-0.6) * (p.xz - vec2(-0.36, 0.0));\n    if (abs(pn.x) < 0.07 && abs(pn.y) < 0.005) alb = vec3(0.1, 0.12, 0.55);\n    if (length((p.xz - vec2(0.0, 0.62)) / vec2(0.16, 0.09)) < 1.0) alb = vec3(0.05);\n    if (abs(p.x - 0.36) < 0.11 && abs(p.z - 0.11) < 0.09) alb = vec3(0.05, 0.05, 0.07);   // mouse pad\n    ao = contactShadow(p);\n  } else if (id == 2) {\n    n = vec3(0.0, 1.0, 0.0); alb = vec3(0.1, 0.09, 0.1);\n  } else if (id == 3) {\n    alb = vec3(0.15, 0.16, 0.21);\n    if (abs(p.x + 0.8) < 0.2 && abs(p.y - 0.75) < 0.27) alb = pal(vibe + floor(p.y * 14.0) / 14.0 * 0.5 + 0.1) * 0.7;\n    if (abs(p.x - 0.85) < 0.16 && abs(p.y - 0.62) < 0.12) alb = vec3(0.8, 0.8, 0.75) * (0.7 + 0.3 * step(0.5, fract(p.x * 30.0 + p.y * 30.0)));\n  } else if (id == 4) {\n    alb = vec3(0.2, 0.12, 0.07);\n  } else if (id == 5) {\n    vec2 s = vec2((p.x + 0.35) / 0.7, (p.y - 0.17) / 0.395);\n    alb = vec3(0.035); spec = 0.6;\n    if (s.x > 0.0 && s.x < 1.0 && s.y > 0.0 && s.y < 1.0) { emit = screenContent(s) * 1.5; alb = vec3(0.0); }\n    vec2 n1 = rot(0.12) * (p.xy - vec2(0.33, 0.56));\n    vec2 n2 = rot(-0.08) * (p.xy - vec2(-0.355, 0.24));\n    if (max(abs(n1.x), abs(n1.y)) < 0.035) { alb = vec3(0.95, 0.85, 0.25); emit = vec3(0.0); spec = 0.0; if (fract(n1.y * 90.0) < 0.15 && abs(n1.x) < 0.025) alb *= 0.6; }\n    if (max(abs(n2.x), abs(n2.y)) < 0.03) { alb = vec3(1.0, 0.45, 0.7); emit = vec3(0.0); spec = 0.0; }\n  } else if (id == 6) {\n    alb = vec3(0.05);\n  } else if (id == 7) {\n    n = vec3(0.0, 1.0, 0.0);\n    vec2 kp = vec2((p.x + 0.24) / 0.48 * 16.0, (p.z - 0.05) / 0.17 * 5.5);\n    vec2 kc = floor(kp), kf = fract(kp);\n    float gapx = step(0.08, kf.x) * step(kf.x, 0.92);\n    if (kc.y < 0.5 && kc.x > 4.5 && kc.x < 11.5) gapx = 1.0 - step(abs(kp.x - 8.0), 3.42) * 0.0 - (1.0 - step(abs(kp.x - 8.0), 3.42));   // spacebar\n    float key = gapx * step(0.1, kf.y) * step(kf.y, 0.9);\n    vec2 kid = kc; if (kc.y < 0.5 && kc.x > 4.5 && kc.x < 11.5) kid = vec2(8.0, 0.0);\n    float pressed = step(0.86, h21(kid + floor(gTyped) * vec2(1.3, 2.7))) * gTyping;\n    vec3 rgb = pal(kc.x * 0.06 - T * 0.4 + vibe);\n    alb = mix(vec3(0.02), vec3(0.08), key);\n    float legend = step(abs(kf.x - 0.35), 0.09) * step(abs(kf.y - 0.62), 0.1) * key;\n    emit = rgb * (0.03 * key + 0.5 * pressed * key + 0.12 * (1.0 - key) + 0.25 * legend);\n    if (gFlash > 0.001) {\n      vec2 kc0 = vec2(8.0 + (h11(gImpK * 3.7 + gSlamCyc) - 0.5) * 6.0, 2.6 + (h11(gImpK * 5.1 + gSlamCyc * 1.3) - 0.5) * 2.0);\n      float hitk = step(length((kid + 0.5 - kc0) * vec2(1.0, 1.5)), 2.4) * step(0.4, h21(kid + gImpK * 7.1 + gSlamCyc * 3.3));\n      emit += mix(rgb, vec3(1.0), 0.6) * hitk * gFlash * key * 2.5;\n    }\n    ao = contactShadow(p);\n  } else if (id == 8) {\n    alb = vec3(0.04);\n    emit = pal(p.x * 2.0 - T * 0.4 + vibe) * 0.15;\n  } else if (id == 9) {\n    n = normalize(vec3(p.x - 0.5, 0.0, p.z - 0.34));\n    alb = vec3(0.85, 0.18, 0.5); spec = 0.5;\n    if (abs(p.y - 0.06) < 0.012) alb = vec3(0.92);\n  } else if (id == 10) {\n    n = vec3(0.0, 1.0, 0.0); alb = vec3(0.07, 0.035, 0.015); spec = 1.0;\n  } else if (id == 11) {\n    n = tN;\n    alb = vec3(0.045, 0.045, 0.055); spec = 0.3;\n    if (n.z < -0.5) {                                   // front panel\n      vec2 f = vec2((p.x - 0.6) / 0.19, p.y / 0.43);\n      if (f.y < 0.55 && fract(f.y * 40.0) < 0.35 && f.x > 0.2 && f.x < 0.85) alb = vec3(0.012);\n      float pw = length((f - vec2(0.55, 0.86)) * vec2(0.19, 0.43));\n      emit = vec3(0.2, 0.5, 1.0) * smoothstep(0.009, 0.006, pw) * smoothstep(0.003, 0.005, pw) * 2.0;\n      float hdd = step(0.5, h11(floor(T * 14.0))) * step(0.5, gTyping + gSlam);\n      emit += vec3(1.0, 0.25, 0.1) * hdd * smoothstep(0.004, 0.002, length((f - vec2(0.55, 0.79)) * vec2(0.19, 0.43))) * 2.0;\n      emit += pal(f.y * 0.6 - T * 0.3 + vibe) * step(abs(f.x - 0.07), 0.025) * 0.8;\n    } else if (n.x < -0.5) {                            // glass side, two fans glowing inside\n      vec2 g = p.zy;\n      alb = vec3(0.02, 0.02, 0.03); spec = 0.8;\n      for (int k = 0; k < 3; k++) {\n        float fk = float(k);\n        vec2 c = k < 2 ? vec2(0.355, 0.1 + fk * 0.15) : vec2(0.72, 0.35);\n        float rr = k < 2 ? 0.058 : 0.045;\n        float d = length(g - c);\n        float blades = 0.5 + 0.5 * sin(atan(g.y - c.y, g.x - c.x) * 7.0 - T * 25.0);\n        emit += pal(vibe + fk * 0.3 - T * 0.2) * (smoothstep(0.007, 0.0, abs(d - rr)) * 1.2 + step(d, rr - 0.004) * blades * 0.08);\n      }\n      vec2 gq = g - vec2(0.56, 0.2);\n      if (abs(gq.x) < 0.14 && abs(gq.y) < 0.022) {                 // graphics card\n        alb = vec3(0.07, 0.07, 0.08);\n        emit += pal(vibe + gq.x * 3.0 - T * 0.3) * step(gq.y, -0.016) * 1.2;\n      }\n      if (abs(g.x - 0.62) < 0.035 && abs(g.y - 0.33) < 0.035) alb = vec3(0.1, 0.1, 0.11);   // cpu cooler\n    }\n  } else if (id == 12) {\n    vec3 ba = sb - sa, pa = p - sa;\n    n = (pa - ba * clamp(dot(pa, ba) / dot(ba, ba), 0.0, 1.0)) / sr;\n    bool arm = hp == 7 || hp == 8;\n    alb = arm ? vec3(0.55, 0.56, 0.6) : (hp >= 4 && hp <= 6) ? vec3(0.3, 0.12, 0.45) : vec3(0.025);\n    spec = arm ? 0.9 : 0.25;\n  } else if (id == 20) {\n    n = normalize((p - hc) / (hr * hr));\n    if (hp < 12) {\n      int k = hp < 6 ? hp : hp - 6;\n      alb = vec3(0.78, 0.52, 0.4);\n      if (k == 5) { alb = vec3(0.09, 0.1, 0.13); if (p.z > hc.z + 0.17) alb = vec3(0.13, 0.14, 0.18); }\n      // keyboard glow on the undersides of the hands\n      emit = alb * pal(T * 0.4 + vibe) * 0.12 * max(0.3 - n.y, 0.0) * exp(-max(p.y - 0.02, 0.0) * 30.0);\n    } else if (hp < 14) {\n      alb = vec3(1.0, 0.8, 0.1);\n      if (hp == 13 && n.z < -0.6 && p.y < hc.y - 0.002) alb = vec3(1.0, 0.42, 0.05);\n      if (hp == 13 && n.z < -0.3 && abs(abs(p.x - hc.x) - 0.01) < 0.004 && abs(p.y - hc.y - 0.007) < 0.004) alb = vec3(0.02);\n    } else if (hp == 14) {\n      alb = vec3(0.05); spec = 0.5;\n      emit = pal(-T * 0.4 + vibe) * 0.4 * step(abs(p.x - hc.x), 0.003) * step(0.0, n.y);\n    } else {                                            // lamp shade (glowing rim) and base\n      alb = vec3(0.08, 0.32, 0.3); spec = 0.6;\n      if (hp == 15 && p.y < hc.y - 0.018) { alb = vec3(0.0); emit = vec3(1.0, 0.82, 0.55) * (0.4 + 2.5 * lamp); }\n    }\n  }\n\n  // light: the screen is the main lamp; a dim warm room light; a cold night ambient\n  vec3 scr = 0.1 + 0.35 * pal(vibe + T * 0.02 + 0.2) + 0.25 * exp(-gCol * 0.9) * step(mod(gLine, 2.0), 0.5);\n  vec3 L = vec3(0.0, 0.37, 0.53) - p;\n  float dl = length(L); L /= dl;\n  float front = step(p.z, 0.545);\n  float fall = front / (1.0 + dl * dl * 5.0);\n  vec3 col = alb * scr * max(dot(n, L), 0.0) * fall * 2.4;\n  vec3 lampC = vec3(1.0, 0.8, 0.55);\n  vec3 Lp = vec3(-0.46, 0.355, 0.48) - p;\n  float dlp = length(Lp); Lp /= dlp;\n  float cone = smoothstep(0.45, 0.85, dot(-Lp, normalize(vec3(0.3, -1.0, -0.35))));\n  col += alb * lampC * lamp * (cone * 1.6 + 0.12) * max(dot(n, Lp), 0.0) / (1.0 + dlp * dlp * 12.0);\n  col += alb * lampC * lamp * 0.05;\n  col += alb * vec3(0.05, 0.06, 0.09) * 0.5;\n  col *= ao;\n  col += scr * pow(max(dot(n, normalize(L - rd)), 0.0), 40.0) * spec * fall;\n  col += emit;\n  {                                                     // a soft glow around the bulb\n    vec3 bulb = vec3(-0.47, 0.36, 0.49) - ro;\n    float along = max(dot(bulb, rd), 0.0);\n    float miss = length(bulb - rd * along);\n    if (along < tb + 0.01) col += lampC * lamp * 0.00012 / (miss * miss + 0.0004);\n  }\n\n  // lens: vignette, tonemap, grain\n  vec2 sv = gl_FragCoord.xy / RENDERSIZE;\n  col *= 0.35 + 0.65 * pow(16.0 * sv.x * sv.y * (1.0 - sv.x) * (1.0 - sv.y), 0.25);\n  col = col / (1.0 + col);\n  col = pow(col, vec3(0.4545));\n  col += (h21(gl_FragCoord.xy + fract(T) * 100.0) - 0.5) * 0.03;\n  gl_FragColor = vec4(col, 1.0);\n}\n",
    "generator": {
      "model": "claude-opus-5-5",
      "provider": "anthropic",
      "prompt": "first person view of a guy banging his hands on a keyboard at a computer and its drawing a series of weird 2d moving shapes on the screen with a simulacra of some code overlaid on top, basically the first person view of somebody live demo coding. a few basic little elements on the desk, camera moving where the typer's gaze would go. then: cables to a basic computer tower, a desk lamp lighting the room, and when fury is above 2/3 he stops typing and slams his head on the keyboard three times, keys blinking on each hit.",
      "params": null
    }
  }
}