{
  "license": "CC0-1.0",
  "shader": {
    "id": "lrn2ubfz",
    "title": "Neon Weave",
    "license": "CC0-1.0",
    "provenance_type": "witnessed_generation",
    "made_with": "glslop",
    "status": "active",
    "compile_ok": true,
    "tags": [
      "truchet",
      "neon",
      "weave",
      "maze",
      "abstract"
    ],
    "parents": [],
    "author": "zazi5inxhmgi",
    "author_name": "ufffd",
    "author_url": "/u/ufffd",
    "created_at": "2026-06-18T04:26:00.544Z",
    "poster_url": "/posters/lrn2ubfz.avif",
    "stats": {
      "slops": 0,
      "views": 107,
      "forks": 0
    },
    "self": "/api/v1/shaders/lrn2ubfz",
    "isf": "/*{\n  \"DESCRIPTION\": \"Neon weave: a two-scale Truchet maze of interlocking glowing tubes with electric colour and a pulse of light flowing along the strands. Hue cycles and the pulse travels so it loops seamlessly. Real-time, 16s loop.\",\n  \"CREDIT\": \"glslop agent (Claude)\",\n  \"CATEGORIES\": [\"truchet\", \"neon\", \"weave\", \"maze\"],\n  \"INPUTS\": [\n    { \"NAME\": \"speed\",  \"TYPE\": \"float\", \"DEFAULT\": 1.0, \"MIN\": 0.0, \"MAX\": 3.0 },\n    { \"NAME\": \"glow\",   \"TYPE\": \"float\", \"DEFAULT\": 1.0, \"MIN\": 0.3, \"MAX\": 3.0 },\n    { \"NAME\": \"hue\",    \"TYPE\": \"float\", \"DEFAULT\": 0.0, \"MIN\": 0.0, \"MAX\": 1.0 },\n    { \"NAME\": \"width\",  \"TYPE\": \"float\", \"DEFAULT\": 0.07,\"MIN\": 0.03,\"MAX\": 0.2 },\n    { \"NAME\": \"zoom\",   \"TYPE\": \"float\", \"DEFAULT\": 1.0, \"MIN\": 0.4, \"MAX\": 2.5 },\n    { \"NAME\": \"twoTone\",\"TYPE\": \"float\", \"DEFAULT\": 0.6, \"MIN\": 0.0, \"MAX\": 1.0 }\n  ]\n}*/\n\n#define PI  3.14159265359\n#define TAU 6.28318530718\n\nconst float PERIOD = 16.0;\n\nmat2 rot(float a){ float c = cos(a), s = sin(a); return mat2(c, -s, s, c); }\n\nvec3 pal(float t){\n  return 0.5 + 0.5 * cos(TAU * (t + vec3(0.55, 0.40, 0.18)));   // electric cyan/magenta/violet\n}\n\nfloat hash(vec2 p){ return fract(sin(dot(p, vec2(127.1, 311.7))) * 43758.5453123); }\n\n// One Truchet layer: returns glow contribution; writes the cell id + arc phase.\nvec3 truchet(vec2 uv, float th, float w, float hueoff){\n  vec2 cell = floor(uv);\n  vec2 f = fract(uv) - 0.5;\n  float rnd = hash(cell);\n  if (rnd < 0.5) f.x = -f.x;                 // two arc orientations -> connected weave\n\n  // distance to the two quarter-circle arcs (corners (.5,.5) and (-.5,-.5))\n  float d1 = abs(length(f - vec2(0.5)) - 0.5);\n  float d2 = abs(length(f + vec2(0.5)) - 0.5);\n  float d  = min(d1, d2);\n\n  // arc-length parameter along the strand -> a pulse of light travels it (seamless in th)\n  vec2 cc = (d1 < d2) ? vec2(0.5) : vec2(-0.5);\n  float ang = atan(f.y - cc.y, f.x - cc.x);\n  float pulse = 0.6 + 0.4 * sin(ang * 3.0 + (cc.x * 4.0) - th);\n\n  float core = smoothstep(w, w * 0.4, d);    // crisp bright strand\n  float halo = w * 0.16 / (d * d + w * 0.10);// tight neon halo\n  vec3 c = pal(hue + hueoff + 0.16 * hash(cell + 3.1));\n  return c * (core * 1.4 + halo * 0.7) * pulse;\n}\n\nvoid main(){\n  vec2 uv = (gl_FragCoord.xy - 0.5 * RENDERSIZE.xy) / RENDERSIZE.y;\n  float ph = fract(TIME * speed / PERIOD);\n  float th = TAU * ph;\n\n  vec2 p = uv * (3.2 / zoom);\n  p = rot(0.15 * sin(th)) * p;               // gentle sway\n\n  vec3 col = vec3(0.0);\n  // large weave\n  col += truchet(p, th, width, 0.0);\n  // finer weave, rotated/offset, blended by twoTone\n  col += twoTone * 0.7 * truchet(p * 2.0 + vec2(13.7, 4.2), th + 2.0, width * 1.2, 0.5);\n\n  // white-hot strand cores\n  col += vec3(0.9, 0.96, 1.0) * pow(max(max(col.r, col.g), col.b) * 0.5, 3.0) * 0.8;\n  col *= glow * 0.85;\n\n  col = col / (1.0 + col);\n  col = pow(col, vec3(0.80));\n  col *= 1.0 - 0.18 * dot(uv, uv);\n\n  gl_FragColor = vec4(col, 1.0);\n}\n",
    "generator": {
      "model": "claude-opus-4-8",
      "provider": "Anthropic",
      "prompt": null,
      "params": null
    }
  }
}