{
  "license": "CC0-1.0",
  "shader": {
    "id": "ptojdhva",
    "title": "Hex Pulse",
    "license": "CC0-1.0",
    "provenance_type": "witnessed_generation",
    "made_with": "claude-code",
    "status": "active",
    "compile_ok": true,
    "tags": [
      "hexagon",
      "grid",
      "pulse",
      "geometric",
      "ripple"
    ],
    "parents": [],
    "author": "zazi5inxhmgi",
    "author_name": "ufffd",
    "author_url": "/u/ufffd",
    "created_at": "2026-06-20T05:32:17.376Z",
    "poster_url": "/posters/ptojdhva.avif",
    "stats": {
      "slops": 0,
      "views": 133,
      "forks": 0
    },
    "self": "/api/v1/shaders/ptojdhva",
    "isf": "/*{\n  \"DESCRIPTION\": \"Hex reactor — a hexagonal grid lit by interfering wavefronts, each cell glowing with a rotating spoke and blooming hot nodes.\",\n  \"CREDIT\": \"claude-opus-4-8\",\n  \"INPUTS\": [\n    { \"NAME\": \"scale\",  \"TYPE\": \"float\", \"DEFAULT\": 7.5, \"MIN\": 3.0, \"MAX\": 16.0 },\n    { \"NAME\": \"speed\",  \"TYPE\": \"float\", \"DEFAULT\": 1.0, \"MIN\": 0.0, \"MAX\": 3.0 },\n    { \"NAME\": \"glow\",   \"TYPE\": \"float\", \"DEFAULT\": 0.8, \"MIN\": 0.2, \"MAX\": 1.8 },\n    { \"NAME\": \"hue\",    \"TYPE\": \"float\", \"DEFAULT\": 0.55, \"MIN\": 0.0, \"MAX\": 1.0 }\n  ]\n}*/\n\nconst float SQ3 = 1.7320508;\nmat2 rot(float a){ float c = cos(a), s = sin(a); return mat2(c, -s, s, c); }\nfloat hash(vec2 p){ p = fract(p * vec2(127.1, 311.7)); p += dot(p, p + 34.5); return fract(p.x * p.y); }\nvec3 palette(float t){ return 0.5 + 0.5 * cos(6.28318 * (t + vec3(0.0, 0.33, 0.67) + hue)); }\n\n// nearest hex-cell local coords (.xy) + cell id (.zw)\nvec4 hexCoords(vec2 p){\n  vec2 r = vec2(1.0, SQ3), h = r * 0.5;\n  vec2 a = mod(p, r) - h;\n  vec2 b = mod(p - h, r) - h;\n  vec2 gv = dot(a, a) < dot(b, b) ? a : b;\n  return vec4(gv, p - gv);\n}\n\nvoid main(){\n  vec2 uv = (gl_FragCoord.xy - 0.5 * RENDERSIZE) / RENDERSIZE.y;\n\n  float zoom = scale * (1.0 + 0.06 * sin(TIME * 0.3));\n  vec2 pp = uv * zoom * rot(0.05 * sin(TIME * 0.15));\n  vec4 hc = hexCoords(pp);\n  vec2 gv = hc.xy, id = hc.zw;\n\n  // distance to hex edge (0 at center .. 0.5 at edge)\n  vec2 a = abs(gv);\n  float edge = max(dot(a, normalize(vec2(1.0, SQ3))), a.x);\n  float dEdge = 0.5 - edge;\n\n  // interference field: three moving wave sources, sampled at the cell centre\n  vec2 cc = id / zoom;\n  float field = 0.0;\n  for (int s = 0; s < 3; s++){\n    float fs = float(s);\n    vec2 src = 0.75 * vec2(sin(TIME * 0.5 + fs * 2.1), cos(TIME * 0.4 + fs * 1.7));\n    field += sin(length(cc - src) * 7.0 - TIME * 2.0 * speed + fs * 1.7);\n  }\n  float lit = 0.5 + 0.5 * field / 3.0;            // 0..1 cell brightness\n  lit = pow(lit, 1.5);\n\n  float rnd = hash(id);\n  vec3 c = palette(0.18 * lit + 0.12 * length(id) + 0.05 * TIME + 0.2 * rnd);\n\n  vec3 col = vec3(0.0);\n  // glowing cell fill, driven by interference\n  col += smoothstep(0.16, 0.46, dEdge) * c * (0.12 + 1.1 * lit * lit);\n  // bright beveled edge ring\n  col += smoothstep(0.07, 0.0, dEdge) * palette(0.3 + 0.15 * lit) * (0.25 + 0.9 * lit);\n  // rotating spoke inside each lit cell — per-cell phase\n  vec2 rgv = rot(TIME * 0.6 * speed + rnd * 6.28) * gv;\n  float spoke = smoothstep(0.05, 0.0, abs(rgv.x)) * smoothstep(0.42, 0.2, length(gv));\n  col += spoke * palette(0.55 + 0.2 * lit) * lit * 0.8;\n  // hot-node bloom on the brightest cells\n  col += smoothstep(0.85, 1.0, lit) * 0.6 * palette(0.6 + 0.1 * rnd);\n  col += pow(lit, 3.0) * 0.18 * c;                // soft neighbour bleed\n\n  col *= 1.0 - 0.3 * dot(uv, uv);                 // vignette\n  col *= glow;\n  col = col / (1.0 + 0.7 * col);\n  col = pow(max(col, 0.0), vec3(0.85));\n  gl_FragColor = vec4(col, 1.0);\n}\n",
    "generator": {
      "model": "claude-opus-4-8",
      "provider": "anthropic",
      "prompt": null,
      "params": null
    }
  }
}