{
  "license": "CC0-1.0",
  "shader": {
    "id": "dbvlcck0",
    "title": "Lodestone",
    "license": "CC0-1.0",
    "provenance_type": "witnessed_generation",
    "made_with": "claude-code",
    "status": "active",
    "compile_ok": true,
    "tags": [
      "vector-field",
      "iron-filings",
      "magnetic",
      "kinetic",
      "grid",
      "minimal"
    ],
    "parents": [],
    "author": "zazi5inxhmgi",
    "author_name": "ufffd",
    "author_url": "/u/ufffd",
    "created_at": "2026-06-20T07:54:21.669Z",
    "poster_url": "/posters/dbvlcck0.avif",
    "stats": {
      "slops": 0,
      "views": 150,
      "forks": 0
    },
    "self": "/api/v1/shaders/dbvlcck0",
    "isf": "/*{\n  \"DESCRIPTION\": \"Needle field — a grid of tiny compass needles swinging into alignment with a drifting interference flow, like iron filings breathing.\",\n  \"CREDIT\": \"claude-opus-4-8\",\n  \"INPUTS\": [\n    { \"NAME\": \"scale\", \"TYPE\": \"float\", \"DEFAULT\": 16.0, \"MIN\": 6.0, \"MAX\": 34.0 },\n    { \"NAME\": \"flow\",  \"TYPE\": \"float\", \"DEFAULT\": 1.0, \"MIN\": 0.0, \"MAX\": 2.5 },\n    { \"NAME\": \"len\",   \"TYPE\": \"float\", \"DEFAULT\": 0.3, \"MIN\": 0.1, \"MAX\": 0.45 },\n    { \"NAME\": \"tint\",  \"TYPE\": \"float\", \"DEFAULT\": 0.5, \"MIN\": 0.0, \"MAX\": 1.0 }\n  ]\n}*/\n\nmat2 rot(float a){ float c = cos(a), s = sin(a); return mat2(c, -s, s, c); }\n\n// flow field from drifting in-view vortices + sources -> needles swirl like iron filings\nvec2 fieldVec(vec2 q, float t){\n  vec2 v = 0.3 * vec2(cos(q.y * 1.1 + t * 0.4), sin(q.x * 1.0 - t * 0.3));  // gentle base flow\n  for (int i = 0; i < 3; i++){\n    float fi = float(i);\n    vec2 c = 0.85 * vec2(sin(t * 0.3 + fi * 2.1), cos(t * 0.25 + fi * 1.7));\n    vec2 d = q - c;\n    float r2 = dot(d, d) + 0.05;\n    float sgn = (mod(fi, 2.0) < 0.5) ? 1.0 : -1.0;\n    v += sgn * vec2(-d.y, d.x) / r2;            // vortex circulation\n    v += 0.25 * (fi - 1.0) * d / r2;            // source/sink\n  }\n  return v;\n}\n\nvoid main(){\n  vec2 uv = (gl_FragCoord.xy - 0.5 * RENDERSIZE) / RENDERSIZE.y;\n  vec2 p = uv * scale;\n  vec2 id = floor(p);\n  vec2 gv = fract(p) - 0.5;\n\n  vec2 cc = (id + 0.5) / scale;               // cell centre in screen space\n  vec2 fv = fieldVec(cc * 2.5, TIME) * flow;\n  float ang = atan(fv.y, fv.x);\n  float mag = clamp(length(fv) * 0.5, 0.25, 1.0);\n\n  // rotated capsule (the needle) aligned to the field\n  vec2 g = rot(-ang) * gv;\n  float L = len * mag;\n  float d = length(vec2(max(abs(g.x) - L, 0.0), g.y));\n  float needle = smoothstep(0.07, 0.03, d);\n  float glow = smoothstep(0.16, 0.0, d);\n\n  vec3 deep = vec3(0.0, 0.02, 0.05);\n  vec3 cyan = mix(vec3(0.2, 0.8, 1.0), vec3(0.5, 0.5, 1.0), tint);\n\n  vec3 col = deep;\n  col += cyan * needle * (0.4 + 0.8 * mag);\n  col += cyan * glow * 0.18 * mag;            // soft halo\n  col += vec3(0.8, 0.95, 1.0) * smoothstep(0.04, 0.0, d) * mag;   // bright tip core\n\n  col *= 1.0 - 0.3 * dot(uv, uv);\n  col = pow(max(col, 0.0), vec3(0.9));\n  gl_FragColor = vec4(col, 1.0);\n}\n",
    "generator": {
      "model": "claude-opus-4-8",
      "provider": "anthropic",
      "prompt": null,
      "params": null
    }
  }
}