{
  "format": "field",
  "version": 1,
  "meta": {
    "name": "Vals Clerestory Caustics",
    "author": "Infinite",
    "description": "Layered Valser quartzite strata cut by narrow clerestory light slits over shimmering thermal water caustics.",
    "domain": "pixel"
  },
  "device": {
    "code": "# Vals Clerestory Caustics (Field Pixel)\np = vec2((uv.x - 0.5) * aspect, uv.y - 0.5);\n\n# Modular horizontal quartzite masonry bands\nrow = floor(uv.y * 22.0);\njoint = smoothstep(0.04, 0.14, fract(uv.y * 22.0));\nvein = 0.5 + 0.5 * sin(uv.x * 14.0 + row * 2.1 + sin(uv.x * 5.0 - t * 0.25) * 1.4);\nstone = mix(0.18, 0.36, vein) * joint;\n\n# Thermal water caustics in lower basin\nwaterMask = smoothstep(0.42, 0.28, uv.y);\nwarp = sin(p.x * 16.0 + t * 0.9) * cos(p.y * 22.0 - t * 0.7);\ncaustic = pow(0.5 + 0.5 * sin((p.x + warp * 0.08) * 28.0 + t * 1.2), 3.0) * waterMask;\n\n# Narrow clerestory roof light slits\nslit1 = exp(-abs(p.x + 0.18) * 18.0) * smoothstep(-0.45, 0.45, p.y + 0.25);\nslit2 = exp(-abs(p.x - 0.22) * 22.0) * smoothstep(-0.35, 0.45, p.y + 0.15);\nslit = clamp(slit1 + slit2, 0.0, 1.0);\n\ncCharcoal = vec3(0.110, 0.125, 0.141);\ncSlate = vec3(0.42, 0.46, 0.49);\ncTeal = vec3(0.239, 0.471, 0.502);\ncBeam = vec3(0.851, 0.796, 0.710);\n\ncol = mix(cCharcoal, cSlate, stone);\ncol = mix(col, cTeal * (0.7 + 0.7 * caustic), clamp(waterMask * 0.85, 0.0, 1.0));\ncol = mix(col, cBeam, clamp(slit * 0.78, 0.0, 1.0));\n",
    "params": {
      "strata": 22.0
    }
  }
}
