A6: Sea, sky and weather
Weather.at(tide, tick) derives the weather from the tide's schedule alone, so every client sees the same sky with nothing new on the wire: the storm builds from calm at the first tide to a gale at sudden death, and the light runs from mid-afternoon to dusk at the time limit. WeatherView applies it each sync to the sky, sun, fog, ambient light, the sea's roughness and rain around the camera (CPUParticles3D, for both renderers). Under water the view closes into SEA_MURK, the rain stops and the surface is a rippled ceiling seen from below. The sea shader darkens open water and adds chop and whitecaps with the storm, and keeps a breathing foam band at the waterline with a fainter line beyond. In the Compatibility renderer, whose depth texture the shader can't read (the sea came out all foam), water depth comes from a texture of the terrain's heights instead. Sea colours move into Palette; the rain and wind beds follow the weather. Tests: test_weather (7). make check passes (611 tests). Captures: make sea-captures (every tide phase, calm beach, the last land in the gale, under water, and three in the Compatibility renderer). Closes #46 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
+29
-2
@@ -65,6 +65,16 @@ or `src/app`, and on any palette colour this table doesn't list. Values are sRGB
|
||||
| `SKY_HAZE` | 0.82, 0.78, 0.68 | Salt-hazed horizon |
|
||||
| `SKY_BELOW` | 0.18, 0.20, 0.20 | Below the horizon |
|
||||
| `SEA_FOG` | 0.78, 0.78, 0.74 | Distance fog |
|
||||
| `STORM_SKY` | 0.36, 0.40, 0.44 | The gale's low cloud overhead |
|
||||
| `STORM_HAZE` | 0.58, 0.60, 0.60 | The gale's horizon |
|
||||
| `DUSK_HAZE` | 0.86, 0.66, 0.50 | The dusk horizon late in a match |
|
||||
| `DUSK_SUN` | 1.0, 0.78, 0.56 | The low evening sun's light |
|
||||
| `RAIN` | 0.80, 0.84, 0.86, 22% | Rain streaks |
|
||||
| `SEA_SHALLOW` | 0.42, 0.55, 0.50 | Water over sand |
|
||||
| `SEA_DEEP` | 0.10, 0.22, 0.30 | Open water |
|
||||
| `SEA_STORM` | 0.13, 0.20, 0.22 | Open water in the gale |
|
||||
| `SEA_FOAM` | 0.86, 0.88, 0.84 | Surf and whitecaps |
|
||||
| `SEA_MURK` | 0.12, 0.28, 0.30 | The view under water |
|
||||
| `INK` | 0.16, 0.13, 0.11 | Printer's ink: outlines, hatching |
|
||||
| `PAPER` | 0.91, 0.87, 0.78 | Unbleached paper: HUD panels and text |
|
||||
| `PAPER_DIM` | 0.66, 0.62, 0.54 | Paper in shadow: panel edges, dimmed text |
|
||||
@@ -75,8 +85,25 @@ or `src/app`, and on any palette colour this table doesn't list. Values are sRGB
|
||||
| `WARNING` | 0.86, 0.32, 0.22 | HUD danger: the tide's next line, low health |
|
||||
| `SEA_INK` | 0.20, 0.34, 0.42 | The sea on the tide gauge and map |
|
||||
|
||||
The terrain shader's sand, marsh, grass, rock and summit colours and the sea shader's
|
||||
shallow, deep and foam colours are shader uniforms. They follow the same rules.
|
||||
The terrain shader's sand, marsh, grass, rock and summit colours are shader uniforms
|
||||
and follow the same rules. The sea shader's colours are set from the `SEA_` entries
|
||||
above by `WaterView`.
|
||||
|
||||
## Weather and light (A6)
|
||||
|
||||
A match runs from a clear salt-hazed afternoon to a gale at dusk, so the sky itself
|
||||
tells the time. `Weather` works it out from the tide's schedule alone, the same on
|
||||
every client:
|
||||
|
||||
- **The storm** builds from calm at the first tide to a full gale at sudden death:
|
||||
cloud lowers (`STORM_SKY`, `STORM_HAZE`), the haze thickens, the sea darkens to
|
||||
`SEA_STORM` with whitecaps and heavier chop, and rain starts once it's past half.
|
||||
- **The light** moves from mid-afternoon to dusk over the whole match: the sun drops
|
||||
toward the sea, warms to `DUSK_SUN` and the horizon to `DUSK_HAZE`, and the storm
|
||||
dims it further.
|
||||
- **The shoreline** always has a foam line where the water is thin, breathing with
|
||||
the swell, so the waterline reads at a glance in every phase.
|
||||
- **Under water** the view closes in to `SEA_MURK` within a few metres.
|
||||
|
||||
## Shading: the woodcut print pass
|
||||
|
||||
|
||||
Reference in New Issue
Block a user