{
  "license": "CC0-1.0",
  "shader": {
    "id": "tk46kqe3",
    "title": "Sashiko",
    "license": "CC0-1.0",
    "provenance_type": "witnessed_generation",
    "made_with": "claude-code",
    "status": "active",
    "compile_ok": true,
    "tags": [
      "hitomezashi",
      "sashiko",
      "tiling",
      "circuit",
      "electric",
      "generative"
    ],
    "parents": [],
    "author": "zazi5inxhmgi",
    "author_name": "ufffd",
    "author_url": "/u/ufffd",
    "created_at": "2026-06-20T07:42:40.622Z",
    "poster_url": "/posters/tk46kqe3.avif",
    "stats": {
      "slops": 1,
      "views": 151,
      "forks": 0
    },
    "self": "/api/v1/shaders/tk46kqe3",
    "isf": "/*{\n  \"DESCRIPTION\": \"Hitomezashi — Japanese sashiko stitching whose row/column parity spontaneously knits spirals and rectangles, lit as electric-ice circuitry.\",\n  \"CREDIT\": \"claude-opus-4-8\",\n  \"INPUTS\": [\n    { \"NAME\": \"scale\", \"TYPE\": \"float\", \"DEFAULT\": 13.0, \"MIN\": 5.0, \"MAX\": 28.0 },\n    { \"NAME\": \"width\", \"TYPE\": \"float\", \"DEFAULT\": 0.09, \"MIN\": 0.03, \"MAX\": 0.2 },\n    { \"NAME\": \"glow\",  \"TYPE\": \"float\", \"DEFAULT\": 0.8, \"MIN\": 0.2, \"MAX\": 1.6 },\n    { \"NAME\": \"speed\", \"TYPE\": \"float\", \"DEFAULT\": 1.0, \"MIN\": 0.0, \"MAX\": 3.0 }\n  ]\n}*/\n\nfloat bit(float i, float seed){ return step(0.5, fract(sin(i * 12.9898 + seed) * 43758.5453)); }\n\nvoid main(){\n  vec2 uv = (gl_FragCoord.xy - 0.5 * RENDERSIZE) / RENDERSIZE.y;\n  vec2 p = uv * scale + vec2(0.06, 0.04) * TIME * speed;   // slow drift\n\n  // horizontal stitches on integer y-lines; present on segment [k,k+1] by row parity\n  float row = floor(p.y + 0.5);\n  float aBit = bit(row, 1.7);\n  float hOn = step(mod(floor(p.x) + aBit, 2.0), 0.5);\n  float hLine = hOn * smoothstep(width, width * 0.2, abs(p.y - row));\n  float hGlow = hOn * smoothstep(width * 3.0, 0.0, abs(p.y - row));\n\n  // vertical stitches on integer x-lines; present on segment [j,j+1] by column parity\n  float coli = floor(p.x + 0.5);\n  float bBit = bit(coli, 4.3);\n  float vOn = step(mod(floor(p.y) + bBit, 2.0), 0.5);\n  float vLine = vOn * smoothstep(width, width * 0.2, abs(p.x - coli));\n  float vGlow = vOn * smoothstep(width * 3.0, 0.0, abs(p.x - coli));\n\n  float net = max(hLine, vLine);\n  float halo = max(hGlow, vGlow);\n\n  // electric current — sharp packets sweeping along the weave from two directions\n  float tt = TIME * speed;\n  float packet = pow(0.5 + 0.5 * sin((p.x + p.y) * 1.7 - tt * 5.0), 10.0)\n               + pow(0.5 + 0.5 * sin((p.x - p.y) * 1.5 - tt * 4.0), 10.0);\n  float ambient = 0.4 + 0.25 * sin((p.x + p.y) * 0.6 - tt * 1.5);\n\n  vec3 ice = vec3(0.30, 0.68, 1.0);\n  vec3 col = vec3(0.0, 0.012, 0.03);\n  col += net * ice * ambient;                        // base glowing stitches\n  col += net * vec3(0.75, 0.92, 1.0) * packet * 1.8; // bright current packets\n  col += net * vec3(0.6, 0.85, 1.0) * 0.22;          // cool core\n  col += halo * ice * (0.25 + 0.5 * packet) * glow;  // soft glow, hotter under current\n\n  col *= 1.0 - 0.25 * dot(uv, uv);\n  col = col / (1.0 + 0.5 * col);\n  col = pow(max(col, 0.0), vec3(0.88));\n  gl_FragColor = vec4(col, 1.0);\n}\n",
    "generator": {
      "model": "claude-opus-4-8",
      "provider": "anthropic",
      "prompt": null,
      "params": null
    }
  }
}