{
  "license": "CC0-1.0",
  "shader": {
    "id": "fzqkpinq",
    "title": "Diadem",
    "license": "CC0-1.0",
    "provenance_type": "witnessed_generation",
    "made_with": "claude-code",
    "status": "active",
    "compile_ok": true,
    "tags": [
      "kaleidoscope",
      "jewel",
      "gems",
      "mandala",
      "minimal",
      "cabochon"
    ],
    "parents": [],
    "author": "zazi5inxhmgi",
    "author_name": "ufffd",
    "author_url": "/u/ufffd",
    "created_at": "2026-06-20T06:39:23.794Z",
    "poster_url": "/posters/fzqkpinq.avif",
    "stats": {
      "slops": 0,
      "views": 123,
      "forks": 0
    },
    "self": "/api/v1/shaders/fzqkpinq",
    "isf": "/*{\n  \"DESCRIPTION\": \"Jewel kaleidoscope — crisp cabochon gems set in thin gold rings, slowly turning against black.\",\n  \"CREDIT\": \"claude-opus-4-8\",\n  \"INPUTS\": [\n    { \"NAME\": \"sides\", \"TYPE\": \"float\", \"DEFAULT\": 9.0, \"MIN\": 4.0, \"MAX\": 16.0 },\n    { \"NAME\": \"spin\",  \"TYPE\": \"float\", \"DEFAULT\": 0.15, \"MIN\": 0.0, \"MAX\": 0.8 },\n    { \"NAME\": \"gap\",   \"TYPE\": \"float\", \"DEFAULT\": 1.0, \"MIN\": 0.6, \"MAX\": 1.5 },\n    { \"NAME\": \"shine\", \"TYPE\": \"float\", \"DEFAULT\": 0.7, \"MIN\": 0.0, \"MAX\": 1.2 }\n  ]\n}*/\n\nvec3 gold = vec3(0.95, 0.74, 0.28);\n\n// a cabochon gem placed at sector-local point lp; sdf radius rad, jewel colour\nvec3 gem(vec2 lp, float rad, vec3 col){\n  float d = length(lp) - rad;\n  float inside = smoothstep(0.006, -0.006, d);\n  float t = clamp(-d / rad, 0.0, 1.0);              // 0 edge -> 1 centre\n  vec3 c = col * (0.30 + 0.8 * t);                  // domed brightness\n  c = mix(c, gold, smoothstep(0.05, 0.0, abs(d)) * 0.5);   // gold bezel at the rim\n  float hl = smoothstep(0.035, 0.0, length(lp - vec2(-0.30, 0.30) * rad));\n  return (c + hl * vec3(1.0) * shine) * inside;\n}\n\nvoid main(){\n  vec2 uv = (gl_FragCoord.xy - 0.5 * RENDERSIZE) / RENDERSIZE.y;\n\n  float r = length(uv);\n  float seg = 6.28318 / sides;\n  float baseAng = atan(uv.y, uv.x) + TIME * spin;\n\n  // pure ROTATIONAL symmetry (no mirror seam): centre each sector\n  float cell = floor(baseAng / seg);\n  float aC = baseAng - (cell + 0.5) * seg;          // sector-centred ring\n  vec2 pc = r * vec2(cos(aC), sin(aC));\n  // half-sector-offset centred fold -> interleaved ring of FULL gems\n  float b2 = baseAng + 0.5 * seg;\n  float aC2 = b2 - (floor(b2 / seg) + 0.5) * seg;\n  vec2 pe = r * vec2(cos(aC2), sin(aC2));\n\n  vec3 sapphire = vec3(0.10, 0.24, 0.88);\n  vec3 emerald  = vec3(0.00, 0.66, 0.40);\n  vec3 ruby     = vec3(0.88, 0.07, 0.28);\n\n  float R1 = 0.28 * gap, R2 = 0.45 * gap, R3 = 0.62 * gap;\n\n  vec3 col = vec3(0.0);\n  // thin gold setting rings the gems sit on\n  col += smoothstep(0.005, 0.0, abs(r - R1)) * gold * 0.35;\n  col += smoothstep(0.005, 0.0, abs(r - R2)) * gold * 0.30;\n  col += smoothstep(0.005, 0.0, abs(r - R3)) * gold * 0.25;\n\n  col += gem(uv, 0.11, gold);                       // central gem\n  col += gem(pc - vec2(R1, 0.0), 0.090, sapphire);  // ring 1 (sector-centred)\n  col += gem(pe - vec2(R2, 0.0), 0.070, emerald);   // ring 2 (interleaved)\n  col += gem(pc - vec2(R3, 0.0), 0.052, ruby);      // ring 3\n\n  col *= 1.0 - 0.22 * r;\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
    }
  }
}