From 5b8306dd6f4359f40bc602f5e8c75c3fa1efce1c Mon Sep 17 00:00:00 2001 From: pkuzic Date: Fri, 25 Sep 2026 10:32:05 +0100 Subject: [PATCH] MONKEY (wet): wet hooks in terrain/static_gx/wow_model, rain rings on water, rainSurfaces cvar + row, wet- scenarios Co-Authored-By: Claude Opus 5.5 --- LIGHTING.md | 1 + crates/benilla-app/assets/ui/OptionsFrame.xml | 30 ++++++++++ crates/benilla-app/src/capture/scenarios.rs | 17 ++++++ crates/benilla-app/src/cvars.rs | 7 +++ crates/benilla-app/src/monkey_gfx.rs | 30 ++++++++-- .../src/shaders/enhanced_water.wgsl | 57 ++++++++++++++++++- .../benilla-assets/src/shaders/terrain.wgsl | 12 ++++ .../benilla-assets/src/shaders/wet_hook.wgsl | 14 +++-- .../benilla-assets/src/shaders/wow_model.wgsl | 14 +++++ .../benilla-world/src/shaders/static_gx.wgsl | 10 ++++ 10 files changed, 178 insertions(+), 14 deletions(-) diff --git a/LIGHTING.md b/LIGHTING.md index 6a3a2d69..394ec0fa 100644 --- a/LIGHTING.md +++ b/LIGHTING.md @@ -25,6 +25,7 @@ behind each constant. | Ground-effect spells | Flamestrike, Rain of Fire, Consecration, Flare and fire traps light the ground for their duration; frost and nature areas stay dark | `spellLightGain` | | Volumetric fog | near-field haze that converges on the zone fog colour (clear within 10 yd, full by 150 yd; mistier at dawn and in bad weather, faint indoors) and sun/moon light shafts through gaps, sampled from the shadow map; own fullscreen pass after the main pass (`benilla-app/src/volumetric_fog.rs`) | Advanced Graphics → Volumetric Fog (Off/Low/High), cvar `volumetricFog`, env `WOW_VOLFOG=0\|1\|2` | | Sky dithering | a faint screen-space dither in the FFXGlow combine so smooth sky and fog gradients do not band (MONKEY p0; was env-only) | Advanced Graphics → Sky Dithering, cvar `skyDither` 0/1 (default 0, Graphics preset High = 1), env `WOW_DITHER=1` still forces it on; bridge in `benilla-app/src/monkey_gfx.rs` | +| Rain on surfaces | MONKEY (wet): while it rains, sky-exposed ground, stone and wood soak (dry→soaked in ~90 s, dry again over ~4 min): darker, slightly more saturated albedo, puddles on flat terrain, a sun highlight + sky Fresnel sheen on up-facing faces; rain rings on exterior Enhanced water. Wetness lives in `benilla-world/src/weather/wetness.rs` → MonkeyFrame `wet_a`; the look is `benilla-assets/src/shaders/wet_hook.wgsl` (one-line hooks in terrain/static_gx/wow_model), rings are `rain_ripple_normal` in `enhanced_water.wgsl`. Phase 1 sky exposure = not interior/unlit/emissive and not downward-facing; no rain-occlusion map yet, so porches and bridges still wet what is under them | Advanced Graphics → Wet Surfaces in Rain, cvar `rainSurfaces` 0/1 (default 1, Graphics preset High = 1); env `WOW_RAIN_SURFACES=0\|1`, `WOW_WETNESS=<0..1>` (pin wetness), `WOW_WET_T=` (pin ripple clock) | | Night and interior level | global dimming of the night sky term and of interior ambient | `nightGain`, `interiorGain`, `interiorBakeFloor` | Players reach all of it from **Options -> Advanced Graphics** (a Lighting Quality preset Off / Low / Medium / High plus the individual rows; Off is the original client look). The dev build has a panel for all of it: **Ctrl+Shift+D → Lighting & shadows**, with Dim / Default / diff --git a/crates/benilla-app/assets/ui/OptionsFrame.xml b/crates/benilla-app/assets/ui/OptionsFrame.xml index a54f95cb..28f3b6ad 100644 --- a/crates/benilla-app/assets/ui/OptionsFrame.xml +++ b/crates/benilla-app/assets/ui/OptionsFrame.xml @@ -521,6 +521,8 @@ interiorDarkness = "Interior Darkness", -- MONKEY (p0 skyDither) skyDither = "Sky Dithering", + -- MONKEY (wet) + rainSurfaces = "Wet Surfaces in Rain", yards = "%d yd", tips = { LIGHTING_QUALITY = @@ -617,6 +619,12 @@ SKY_DITHER = "Adds a faint noise to the final image so smooth sky and fog gradients do not " .. "break into visible bands. Off is the original client's look. Practically free.", + -- MONKEY (wet) + RAIN_SURFACES = + "Rain slowly soaks the ground, stone and wood under the open sky: they darken, " + .. "puddles gather on flat ground and wet tops catch the light; rain drops ring " + .. "the water. It dries over a few minutes after the rain stops. Off is the " + .. "original client's look. Nearly free, and only active while things are wet.", }, }, ruRU = { @@ -651,6 +659,8 @@ interiorDarkness = "Темнота помещений", -- MONKEY (p0 skyDither) skyDither = "Дизеринг неба", + -- MONKEY (wet) + rainSurfaces = "Мокрые поверхности в дождь", yards = "%d ярд.", tips = { LIGHTING_QUALITY = @@ -756,6 +766,12 @@ "Добавляет едва заметный шум в итоговое изображение, чтобы плавные переходы цвета " .. "неба и тумана не распадались на полосы. Выключено — вид оригинального клиента. " .. "Почти ничего не стоит.", + -- MONKEY (wet) + RAIN_SURFACES = + "Дождь постепенно намачивает землю, камень и дерево под открытым небом: они темнеют, " + .. "на ровной земле собираются лужи, мокрые поверхности блестят, а капли расходятся " + .. "кругами по воде. После дождя всё высыхает за несколько минут. Выключено — вид " + .. "оригинального клиента. Почти ничего не стоит и работает, только пока всё мокрое.", }, }, } @@ -816,6 +832,8 @@ "RowNightDarkness", "RowInteriorDarkness", -- MONKEY (p0 skyDither) "RowSkyDither", + -- MONKEY (wet) + "RowRainSurfaces", }, -- Player Guild Names is a child of Player Names, as in 1.12 (l.702-708). Nameplates = { @@ -2854,6 +2872,18 @@ "BENILLA_TOOLTIP_SKY_DITHER") + + + + + + + + OptionsRow_OnLoad(self, "rainSurfaces", + BENILLA_ADVGFX.rainSurfaces, + "BENILLA_TOOLTIP_RAIN_SURFACES") + +