feat/precipitation-particles #112

Merged
akadmin merged 3 commits from feat/precipitation-particles into main 2026-07-12 15:31:51 +00:00
Owner

closes #35

closes #35
Weather-map-driven precipitation: a fullscreen pass after the cloud
composite draws procedural rain streaks or snow flakes (3 parallax
layers), intensity from the map's G channel sampled at the camera XZ.
Sky.precipitation_kind (Rain | Snow) picks the form; ground splashes
deferred.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Three fixes/upgrades to the ADR-0057 precipitation pass:

- Overcast-implies-rain: both the cloud march and the precip pass derive
  storm precipitation from the slider-scaled coverage with the same rule
  noisegen bakes into the weather map's G channel (max(map G,
  smoothstep(0.72, 0.95, coverage))) — the built-in map's G is 0 at the
  origin, so rain was practically unreachable before.

- World-anchored fall (ADR-0057 refinement): the shader rebuilds the
  per-pixel world ray and maps it to an azimuth x elevation domain, so
  drops fall along world gravity out of the cloud layer regardless of
  camera orientation (also fixes the inverted fall sign in y-down UV
  space); wind slant derived per-azimuth from the world wind vector.

- Occlusion (ADR-0058): one draw per parallax layer (far -> near) writes
  its virtual drop depth (6/12/24 m) to gl_FragDepth for the reversed-Z
  Greater test — rain falls between the camera and nearby geometry and
  clips against walls; a per-slot 512^2 top-down rain occlusion map
  (shadow-pass reuse, texel-snapped 80 m ortho box above the camera)
  dries positions with geometry overhead — under a roof it doesn't rain.

Parameters move from push constants to a per-slot PrecipData UBO (240 B,
three matrices no longer fit in push space); push carries only the layer
index. New math::rain_depth_view_proj with unit tests.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
feat: deck-aware precipitation intensity
All checks were successful
CI / build (pull_request) Successful in 3m31s
b69b83e963
Sample the weather map where each view ray meets the cloud base instead
of once at the camera XZ: rain in a given direction follows the deck
actually seen there — a gap in the clouds is a gap in the rain, heavy
cells read as distant curtains. An elevation smoothstep eases the sample
point back to the local column near/below the horizon (no seam), the
look distance clamps at 20 km (half a weather tile), and the cloud
bottom altitude rides a new PrecipData params lane (UBO now 256 bytes).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
akadmin deleted branch feat/precipitation-particles 2026-07-12 15:31:52 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
akadmin/NemesisEngine!112
No description provided.