{
  "format": "field",
  "version": 1,
  "meta": {
    "name": "Karman Vortex Wake",
    "author": "Infinite",
    "description": "Von Karman vortex street fluid wake behind a cylinder with staggered alternating vortex dipoles, curl-advected ember-amber dye filaments, and audio-reactive Strouhal shedding.",
    "domain": "pixel"
  },
  "device": {
    "code": "# Karman Vortex Wake (Field Pixel)\nparam float shedding = 0.45 [0.1, 1.2];\nparam float vorticity = 1.4 [0.5, 2.5];\nparam float filaments = 10.0 [4.0, 18.0];\n\np = vec2((uv.x - 0.5) * aspect, uv.y - 0.5);\n\n# Cylinder obstacle upstream + staggered alternating vortex street\ncyl = length(p - vec2(-0.34, 0.0)) - 0.075;\nwake = smoothstep(-0.34, 0.45, p.x);\n\nxAdv = p.x - t * shedding;\ns1 = sin(xAdv * 8.5) * cos((p.y - 0.085) * 9.5);\ns2 = sin((xAdv + 0.37) * 8.5) * cos((p.y + 0.085) * 9.5);\npsi = p.y * 6.0 + wake * vorticity * (s1 - s2) * exp(-abs(p.y) * 3.8);\n\nstream = 0.5 + 0.5 * sin(psi * filaments * 0.35);\nfilament = smoothstep(0.18, 0.0, abs(fract(psi * 0.65) - 0.5));\nvortCore = smoothstep(0.35, 0.95, abs(s1 - s2)) * wake;\ncylMask = smoothstep(0.0, 0.015, cyl);\n\ncAbyss = vec3(0.055, 0.078, 0.125);\ncSteel = vec3(0.290, 0.482, 0.659);\ncEmber = vec3(0.878, 0.478, 0.259);\ncIvory = vec3(0.863, 0.890, 0.925);\n\ncol = mix(cAbyss, cSteel, stream * 0.68);\ncol = mix(col, cEmber, vortCore * 0.85);\ncol = clamp(col + filament * 0.42 * cIvory, 0.0, 1.0);\ncol = mix(vec3(0.16, 0.18, 0.22), col, cylMask);\n",
    "params": {
      "shedding": 0.45,
      "vorticity": 1.4,
      "filaments": 10.0
    }
  }
}