diff --git a/LIGHTING.md b/LIGHTING.md index c1ccefe1..9263f5c7 100644 --- a/LIGHTING.md +++ b/LIGHTING.md @@ -32,6 +32,7 @@ behind each constant. | Modern fog | MONKEY (fog): radial distance fog with a gradual exponential curve, a daylight sun lobe, and an end colour shared by the world, WDL hull, sky horizon and volumetric haze. Each zone keeps its authored fog end up to the reference view-distance limit; optional `LightFogBand.dbc` rows provide height, sun and end-fog controls. Interior WMO fog stays classic | Advanced Graphics → Modern Fog, cvar `fogModel` 0 Classic (default) / 1 Modern (High = 1), env `WOW_FOGMODEL=0\|1`; `fog_hook.wgsl`, `lighting/fog_model.rs`, `light/fog_band.rs` | | Rain on surfaces | MONKEY (wet): rain gradually darkens and saturates exposed terrain and models, adds puddles and a sky/sun sheen, and produces rings on exterior Enhanced water. Wetness rises over roughly 90 seconds and dries over roughly four minutes; phase 1 has no rain-occlusion map, so shelter is classified only by interior/unlit state and surface facing | Advanced Graphics → Wet Surfaces in Rain, cvar `rainSurfaces` 0/1 (default and High 1), env `WOW_RAIN_SURFACES`, `WOW_WETNESS`, `WOW_WET_T`; `weather/wetness.rs`, `wet_hook.wgsl` | | Foliage wind | one weather-fed gust/veer field drives grass and classified tree/bush foliage; grass also parts around the player and nearby units | Advanced Graphics → Foliage Wind, cvar `foliageWind` 0 Off / 1 Grass / 2 Grass + Trees (High = 2), capture override `WOW_FOLIAGE_WIND`; field and benders in `benilla-world/src/wind/`. The wave phase is the CPU-integrated travel (speed integrated over time, wrapped seamlessly), and the waves' spatial term uses the fixed profile heading; the veer turns only the bend. Tree exile copies sway through material marker bit 14 (`FOLIAGE_WIND_MARKER`). Capture offset `WOW_CAPTURE_WIND_T` (s). Known: shadow casters (world-shadow proxies, `torch_depth.wgsl`) do not apply the sway, so leaves sample a static shadow; a future world-camera DepthPrepass must call the same offsets | +| Ambient occlusion | soft contact shadows under props, in wall-floor corners and around feet; depth-only SSAO at half resolution (depth-reconstructed normals, 6/12 spiral taps, 4x4 depth-aware blur, bilateral upsample) multiplied into the opaque scene after the opaque pass and before the water copy, so water, particles and UI are untouched; fades out 45-90 yd (Low) / 60-120 yd (High), spares sky and bright pixels (`benilla-app/src/ssao.rs`, `benilla-app/src/shaders/ssao.wgsl`) | Advanced Graphics → Ambient Occlusion (Off/Low/High; default Off, High preset 2), cvar `ambientOcclusion`, env `WOW_AO=0\|1\|2`, `WOW_AO_DEBUG=1..4` diagnostic views (factor, protection, distance, raw occlusion), `WOW_AO_GAIN`/`_RADIUS`/`_BIAS`/`_STRENGTH` tuning | | 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 e824d122..9c2ba22c 100644 --- a/crates/benilla-app/assets/ui/OptionsFrame.xml +++ b/crates/benilla-app/assets/ui/OptionsFrame.xml @@ -536,6 +536,8 @@ foliageWind = "Foliage Wind", windGrass = "Grass", windTrees = "Grass + Trees", + -- MONKEY (ao): localised contact-shadow row. + ambientOcclusion = "Ambient Occlusion", yards = "%d yd", tips = { LIGHTING_QUALITY = @@ -668,6 +670,13 @@ "Grass bends in two travelling wind waves and parts around nearby characters. " .. "Grass + Trees also gives classified tree and bush foliage a gentle sway.\n\n" .. "Off makes no vertex displacement and restores the unchanged image. Tree shadows stay static.", + -- MONKEY (ao): what the contact shadows touch and what they spare. + AMBIENT_OCCLUSION = + "Soft contact shadows where surfaces meet: under props and furniture, in the corners " + .. "between walls and floors, and around characters' feet. Low uses fewer samples; " + .. "High is smoother and reaches a little further.\n\n" + .. "Fades out with distance and spares the sky, water, lit windows and flames. " + .. "Off leaves the image unchanged.", }, }, ruRU = { @@ -717,6 +726,8 @@ foliageWind = "Ветер листвы", windGrass = "Трава", windTrees = "Трава + деревья", + -- MONKEY (ao): Russian contact-shadow row. + ambientOcclusion = "Затенение окружения", yards = "%d ярд.", tips = { LIGHTING_QUALITY = @@ -861,6 +872,13 @@ "Трава гнётся двумя бегущими волнами ветра и расступается вокруг персонажей. " .. "Трава + деревья также добавляет мягкое качание листвы деревьев и кустов.\n\n" .. "Выключено не смещает вершины и восстанавливает исходный вид. Тени деревьев остаются неподвижными.", + -- MONKEY (ao): Russian contact-shadow explanation. + AMBIENT_OCCLUSION = + "Мягкие контактные тени там, где поверхности соприкасаются: под предметами и мебелью, " + .. "в углах между стенами и полом, у ног персонажей. «Низкое» использует меньше выборок; " + .. "«Высокое» — более плавное и захватывает чуть больше.\n\n" + .. "Ослабевает с расстоянием и не затрагивает небо, воду, освещённые окна и пламя. " + .. "«Выкл» оставляет изображение без изменений.", }, }, } @@ -933,6 +951,8 @@ "RowRainSurfaces", -- MONKEY (wind): appended for conflict-free lane merges. "RowFoliageWind", + -- MONKEY (ao): appended so the other rows keep their indices. + "RowAmbientOcclusion", }, -- Player Guild Names is a child of Player Names, as in 1.12 (l.702-708). Nameplates = { @@ -3082,6 +3102,22 @@ }) + + + + + + + + OptionsRow_OnLoad(self, "ambientOcclusion", BENILLA_ADVGFX.ambientOcclusion, + "BENILLA_TOOLTIP_AMBIENT_OCCLUSION") + OptionsDropdownRow_Setup(self, { + { text = BENILLA_ADVGFX.fogOff, value = "0" }, + { text = BENILLA_ADVGFX.qLow, value = "1" }, + { text = BENILLA_ADVGFX.qHigh, value = "2" }, + }) + +