Sea shader with shoreline foam, an underwater view, a storm that intensifies through the tide phases, and a sky and lighting cycle within a match.
Acceptance
The rising sea level is clearly visible at the shoreline in captures from each phase.
Works in both Forward+ and Compatibility renderers.
**Depends on:** A1, M2
Sea shader with shoreline foam, an underwater view, a storm that intensifies through the tide phases, and a sky and lighting cycle within a match.
**Acceptance**
- The rising sea level is clearly visible at the shoreline in captures from each phase.
- Works in both Forward+ and Compatibility renderers.
claude
added this to the v0.6 Art, Audio and UI milestone 2026-11-09 05:28:36 +00:00
Weather.at(tide, tick) works out the weather from the tide's schedule alone, so every client sees the same sky and nothing new goes over the wire.
The storm builds from calm at the first tide to a full gale at sudden death.
The light runs from mid-afternoon to dusk at the time limit.
WeatherView applies it on every frame:
sky colours, the sun's height, colour and strength, fog and ambient light
the sea's roughness (sea_state)
rain around the camera (CPUParticles3D, so it works in both renderers)
under water: the fog closes in to SEA_MURK, the rain stops, and the surface seen from below is a rippled ceiling
Sea shader:
open water darkens toward SEA_STORM, with longer, steeper chop and whitecaps as the storm builds
a foam band at the waterline that breathes with the swell, with a fainter second line beyond it
Compatibility renderer: the sea used to render almost entirely as foam, because the shader can't read the depth texture there. It now takes water depth from a texture of the terrain's heights. Forward+ still uses the depth buffer, which also catches pieces and props.
The sea's colours, the storm and dusk colours and the rain colour are now in Palette, documented in a new "Weather and light" section of STYLE.md. The rain and wind sound beds follow the weather.
Testing
test_weather: 7 tests.
make check passes (611 tests).
make sea-captures renders the sea after each tide phase (sea_tide_0 to sea_tide_7, each framed on that tide's waterline), a calm beach, the last land in the gale, and under water. Three of these are also rendered in the Compatibility renderer. I opened and checked them all.
The waterline climbs visibly through phases 0 to 5, with surf at the shore.
On seed 2, the sixth rise (58 m) covers the highest summit (56 m), so tide_6 and tide_7 show open sea. That is sudden death by design.
Limits
The sea surface is flat: swell shows only in the normals and the foam, because the mesh is too coarse to displace.
No caustics or lightning.
The real GPU cost of the rain and the shader hasn't been measured yet. That belongs to H1 and R6.
Done in a4e8147.
**What changed**
- `Weather.at(tide, tick)` works out the weather from the tide's schedule alone, so every client sees the same sky and nothing new goes over the wire.
- The storm builds from calm at the first tide to a full gale at sudden death.
- The light runs from mid-afternoon to dusk at the time limit.
- `WeatherView` applies it on every frame:
- sky colours, the sun's height, colour and strength, fog and ambient light
- the sea's roughness (`sea_state`)
- rain around the camera (`CPUParticles3D`, so it works in both renderers)
- under water: the fog closes in to `SEA_MURK`, the rain stops, and the surface seen from below is a rippled ceiling
- Sea shader:
- open water darkens toward `SEA_STORM`, with longer, steeper chop and whitecaps as the storm builds
- a foam band at the waterline that breathes with the swell, with a fainter second line beyond it
- **Compatibility renderer:** the sea used to render almost entirely as foam, because the shader can't read the depth texture there. It now takes water depth from a texture of the terrain's heights. Forward+ still uses the depth buffer, which also catches pieces and props.
- The sea's colours, the storm and dusk colours and the rain colour are now in `Palette`, documented in a new "Weather and light" section of STYLE.md. The rain and wind sound beds follow the weather.
**Testing**
- `test_weather`: 7 tests.
- `make check` passes (611 tests).
- `make sea-captures` renders the sea after each tide phase (`sea_tide_0` to `sea_tide_7`, each framed on that tide's waterline), a calm beach, the last land in the gale, and under water. Three of these are also rendered in the Compatibility renderer. I opened and checked them all.
- The waterline climbs visibly through phases 0 to 5, with surf at the shore.
- On seed 2, the sixth rise (58 m) covers the highest summit (56 m), so `tide_6` and `tide_7` show open sea. That is sudden death by design.
**Limits**
- The sea surface is flat: swell shows only in the normals and the foam, because the mesh is too coarse to displace.
- No caustics or lightning.
- The real GPU cost of the rain and the shader hasn't been measured yet. That belongs to H1 and R6.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Depends on: A1, M2
Sea shader with shoreline foam, an underwater view, a storm that intensifies through the tide phases, and a sky and lighting cycle within a match.
Acceptance
Done in
a4e8147.What changed
Weather.at(tide, tick)works out the weather from the tide's schedule alone, so every client sees the same sky and nothing new goes over the wire.WeatherViewapplies it on every frame:sea_state)CPUParticles3D, so it works in both renderers)SEA_MURK, the rain stops, and the surface seen from below is a rippled ceilingSEA_STORM, with longer, steeper chop and whitecaps as the storm buildsPalette, documented in a new "Weather and light" section of STYLE.md. The rain and wind sound beds follow the weather.Testing
test_weather: 7 tests.make checkpasses (611 tests).make sea-capturesrenders the sea after each tide phase (sea_tide_0tosea_tide_7, each framed on that tide's waterline), a calm beach, the last land in the gale, and under water. Three of these are also rendered in the Compatibility renderer. I opened and checked them all.tide_6andtide_7show open sea. That is sudden death by design.Limits