# fx_particle
The one surface shader every Tidewater water effect draws its particles with. A unit card
(`mesh.plane`) is stood up in `vertex_clip`: facing the camera (`facing` 0), lying flat on the
water (1, rings and foam patches), or facing the camera stretched along the particle's velocity
(2, streaking spray and droplets). `facing` 3 leaves the mesh as it is, for the faceted low-poly
chunks.
`shape` picks what the card draws: a lit water droplet, a soft spray/mist puff, an expanding ring,
a dissolving foam patch, a bubble, a sparkle. `look_mode` draws it in one of the five Tidewater
looks: realistic (lit beads with sun glints, soft scattering puffs), painted (brush-wobbled dabs in
colour bands with paper grain), cartoon (solid white blobs with an inked outline and a hard
highlight), lowpoly (hexagonal faceted cards and flat-shaded octahedron chunks), pixel (square
pixels on the card, two tones, stepped fade).
Per-particle life (0..1) and a random seed arrive in `shader_data` lane 0 (`data0` on the
graph's points). Draw with `alphaBlend`, no depth write, no culling.
# fx_graph
Graph-building helpers shared by the Tidewater water-effect graphs (`effects/waterfx.effect`):
drawing particles as cards or low-poly chunks in one of the seven looks with the `fx_particle`
shader, writing the per-particle life/seed lane, and the look palettes.
# waterfx: Tidewater water effects
Every small water effect of the Tidewater kit, each drawn in any of the five Tidewater looks
(`look` input: realistic, painted, cartoon, lowpoly, pixel). Particles are GPU-simulated
(`sim.particles`) and drawn as instanced cards through `shaders/fx_particle`, which stands
each card facing the camera, streaked along its velocity, or flat on the water.
Entries (one-shots finish by themselves; continuous ones run until stopped):
- `plop` (a pebble): a small crown of droplets, a centre jet, a ring. Input `size`.
- `body` (a person jumping in): wide crown, tall column, spray puffs, foam patch, three rings. `size`.
- `droplets`: a burst of droplets thrown along `dir`. `size`, `dir`.
- `spray`: one gust of spray blown downwind. `size`, `wind`.
- `bow`: continuous bow spray off both sides of a hull. `at`, `dir`, `speed`, `width`.
- `spindrift`: continuous spray torn off crests by the wind. `at`, `wind`, `width`, `rate`.
- `mist`: continuous rising mist with sunlit sparkles (waterfalls). `at`, `width`, `rate`, `rise`, `wind`, `sparkle`.
- `drips`: continuous drips from an edge with tiny plops and rings below. `at`, `width`, `fall`, `rate`.
- `bubbles`: continuous rising, wobbling bubbles that stop at the surface. `at`, `depth`, `rate`, `width`, `size`.
- `wake`: a V of foam laid on the water behind a mover, fading over `fade` s. `at`, `dir`, `speed`, `width`, `fade`.
Looks: realistic draws lit water beads with sun glints and soft scattering spray; painted draws
brush-wobbled dabs in colour bands with paper grain; cartoon draws solid white blobs with an
inked outline and a hard highlight; lowpoly draws flat-shaded octahedron droplets and hexagonal
faceted puffs and foam; pixel draws square-pixel sprites in two tones with a stepped fade.
Gameplay plays these through `tidewater.modules.fx` (`Fx.splash`, `Fx.emitter`, `Fx.mist`, the
`Wake` and `Splashes` components), which also rings the water and syncs splashes to every peer.
`fx_graph.module` holds the drawing helpers the graphs share.