{
  "format": "field",
  "version": 1,
  "meta": {
    "name": "Muqarnas Stalactite Vault",
    "author": "Infinite",
    "description": "Alhambra-inspired tiered Muqarnas honeycomb dome shader with radial stalactite niches, clerestory sunbeams, and carved warm limestone relief.",
    "domain": "pixel"
  },
  "device": {
    "code": "# Muqarnas Stalactite Vault (Field Pixel)\nparam float symmetry = 8.0 [6.0, 12.0];\nparam float tiers = 7.0 [4.0, 12.0];\nparam float sunbeam = 0.72 [0.2, 1.2];\n\np = vec2((uv.x - 0.5) * aspect, uv.y - 0.5);\nr = length(p);\na = atan2(p.y, p.x);\n\n# Tiered octagonal-to-stellar stalactite folding\nfoldA = abs(fract((a / 6.2831853) * symmetry + t * 0.03) - 0.5) * 2.0;\ntierR = r * tiers;\ntierIdx = floor(tierR);\ntierF = fract(tierR);\n\n# Sub-niche scallop relief inside each tier\nsubFold = abs(fract(foldA * (1.0 + 0.5 * mod(tierIdx, 2.0))) - 0.5) * 2.0;\nniche = smoothstep(0.15, 0.85, subFold) * smoothstep(0.08, 0.55, tierF);\nrib = smoothstep(0.09, 0.0, abs(subFold - 0.5)) + smoothstep(0.07, 0.0, abs(tierF - 0.12));\n\n# Clerestory window light ring & zenith depth\nclerestory = exp(-pow((r - 0.39) * 14.0, 2.0)) * smoothstep(0.35, 0.85, cos(a * symmetry));\nzenith = smoothstep(0.0, 0.45, r);\n\ncUmber = vec3(0.125, 0.102, 0.082);\ncStone = vec3(0.565, 0.478, 0.369);\ncIvory = vec3(0.878, 0.824, 0.718);\ncGold  = vec3(0.945, 0.808, 0.529);\n\ncol = mix(cUmber, cStone, niche * (0.45 + 0.55 * zenith));\ncol = mix(col, cIvory, clamp(rib * 0.55, 0.0, 1.0));\ncol = clamp(col + clerestory * sunbeam * cGold, 0.0, 1.0);\n",
    "params": {
      "symmetry": 8.0,
      "tiers": 7.0,
      "sunbeam": 0.72
    }
  }
}