{
  "format": "field",
  "version": 1,
  "meta": {
    "name": "Fresnel Zone Diffraction",
    "author": "Infinite",
    "description": "Optical Fresnel zone plate wave interference rings with phase-reversed amber-gold and deep cobalt diffraction fringes.",
    "domain": "pixel"
  },
  "device": {
    "code": "# Fresnel Zone Diffraction (Field Pixel)\nparam float zones = 18.0 [6.0, 32.0];\nparam float aberration = 0.45 [0.0, 1.0];\nparam float speed = 0.55 [0.05, 1.5];\n\np = vec2((uv.x - 0.5) * aspect, uv.y - 0.5);\nr2 = dot(p, p);\na = atan2(p.y, p.x);\n\nphase = r2 * zones * 6.2831853 - t * speed * 2.2 + sin(a * 4.0 + t * 0.4) * 0.45 * aberration;\nringA = 0.5 + 0.5 * cos(phase);\nringB = 0.5 + 0.5 * cos(phase * 1.06 + 0.55 * aberration);\nringC = 0.5 + 0.5 * cos(phase * 0.94 - 0.45 * aberration);\n\nfringe = smoothstep(0.18, 0.88, ringA);\ncaustic = pow(ringB * ringC, 2.2);\n\nnavy = vec3(0.043, 0.063, 0.129);\ncobalt = vec3(0.122, 0.231, 0.431);\namber = vec3(0.847, 0.604, 0.235);\nivory = vec3(0.965, 0.914, 0.808);\n\nrgb = mix(navy, cobalt, fringe);\nrgb = mix(rgb, amber, caustic * 0.85);\nrgb = mix(rgb, ivory, pow(caustic, 2.5) * 0.78);\nvig = 1.0 - 0.35 * dot(uv - 0.5, uv - 0.5);\ncol = clamp(rgb * vig, 0.0, 1.0);\n",
    "params": {
      "zones": 18.0,
      "aberration": 0.45,
      "speed": 0.55
    }
  }
}