From 708859a13af5c5ee8dce4cda360dc41840b3c6dd Mon Sep 17 00:00:00 2001 From: pkuzic Date: Fri, 25 Sep 2026 01:34:25 +0100 Subject: [PATCH] MONKEY (p0): skyDither cvar for the FFXGlow deband dither The combine's dither lane was armed only by the WOW_DITHER env var. It is now the `skyDither` cvar (0/1, default 0 = reference look; Graphics preset High = 1) with an Advanced Graphics "Sky Dithering" checkbox row (EN + RU). The cvar lands on `benilla_world::ffx_glow::SkyDither` (extracted) through the new `benilla-app/src/monkey_gfx.rs` bridge; WOW_DITHER=1 still forces it on. Co-Authored-By: Claude Opus 5.5 --- LIGHTING.md | 1 + crates/benilla-app/assets/ui/OptionsFrame.xml | 27 +++++++++++++++++ crates/benilla-app/src/cvars.rs | 12 ++++++++ crates/benilla-app/src/game_plugins.rs | 2 ++ crates/benilla-app/src/lib.rs | 2 ++ crates/benilla-app/src/monkey_gfx.rs | 30 +++++++++++++++++++ crates/benilla-world/src/ffx_glow.rs | 26 +++++++++++----- .../benilla-world/src/shaders/ffx_glow.wgsl | 2 +- 8 files changed, 94 insertions(+), 8 deletions(-) create mode 100644 crates/benilla-app/src/monkey_gfx.rs diff --git a/LIGHTING.md b/LIGHTING.md index 27a804c4..0ffc9dea 100644 --- a/LIGHTING.md +++ b/LIGHTING.md @@ -24,6 +24,7 @@ behind each constant. | Moon shadows | at night the same shadow rig re-aims at the moon and casts a faint shadow; dims only the night sky term, never point lights | `moonShadowStrength` | | 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` | | 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 71e19e82..a54f95cb 100644 --- a/crates/benilla-app/assets/ui/OptionsFrame.xml +++ b/crates/benilla-app/assets/ui/OptionsFrame.xml @@ -519,6 +519,8 @@ spellLights = "Spell Lights", nightDarkness = "Night Darkness", interiorDarkness = "Interior Darkness", + -- MONKEY (p0 skyDither) + skyDither = "Sky Dithering", yards = "%d yd", tips = { LIGHTING_QUALITY = @@ -611,6 +613,10 @@ "Scales interior fixture light and room ambient, including the light from " .. "lamps and candles. Lower values make both dimmer.\n\n" .. "1.0 leaves these inputs unchanged. Free at any setting.", + -- MONKEY (p0 skyDither) + 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.", }, }, ruRU = { @@ -643,6 +649,8 @@ spellLights = "Свет от заклинаний", nightDarkness = "Темнота ночи", interiorDarkness = "Темнота помещений", + -- MONKEY (p0 skyDither) + skyDither = "Дизеринг неба", yards = "%d ярд.", tips = { LIGHTING_QUALITY = @@ -743,6 +751,11 @@ "Масштабирует свет светильников и фоновое освещение помещений, включая " .. "свет ламп и свечей. Меньшие значения ослабляют и то и другое.\n\n" .. "1.0 оставляет эти составляющие без изменений. Ничего не стоит при любом значении.", + -- MONKEY (p0 skyDither) + SKY_DITHER = + "Добавляет едва заметный шум в итоговое изображение, чтобы плавные переходы цвета " + .. "неба и тумана не распадались на полосы. Выключено — вид оригинального клиента. " + .. "Почти ничего не стоит.", }, }, } @@ -801,6 +814,8 @@ "RowInteriorLight", "RowInteriorShadows", "RowExteriorShadows", "RowTorchSoft", "RowFireLight", "RowFireFlicker", "RowSpellLights", "RowLavaGlow", "RowNightDarkness", "RowInteriorDarkness", + -- MONKEY (p0 skyDither) + "RowSkyDither", }, -- Player Guild Names is a child of Player Names, as in 1.12 (l.702-708). Nameplates = { @@ -2827,6 +2842,18 @@ OptionsSliderRow_Setup(self, 0.2, 1.5, 0.05, "darkness") + + + + + + + + OptionsRow_OnLoad(self, "skyDither", + BENILLA_ADVGFX.skyDither, + "BENILLA_TOOLTIP_SKY_DITHER") + +