docs(A7): pin the GENERAL light over-saturation cause (intensity=100 mis-read) + FPS note

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
Erik 2026-06-13 21:19:47 +02:00
parent 1e70a5a484
commit 0fe479ba06

View file

@ -107,9 +107,26 @@ reach the VIEWER (`DistSq > Range²·slack² → skip`), so a room with 2227 tor
8 NEAREST lights and applies the hard range-cutoff PER SURFACE in the shader
(`mesh_modern.frag: if (d < range)`). Fix = drop the viewer-range candidacy filter, take the
nearest 8. Probe after: **`activeLights` 2→8** in the dungeon (the room's 8 nearest torches now
light it). Core lighting suite green. SECONDARY (flagged, not fixed): retail's per-cell ambient
default is 0.30 (`0x3e99999a`) read PER-CELL (`m_clrAmbientLight`) vs our flat 0.20 — a
candidate brightness tweak needing a decomp pass to confirm the world-EnvCell ambient source.
light it). Core lighting suite green. Then `Range = Falloff × 1.5` (retail `rangeAdjust`,
`config_hardware_light` 0x0059adc, `a80061b`+) widened the pools. Ambient 0.20 is
retail-faithful (`SmartBox::SetWorldAmbientLight(0.2f)`); the 0.30 was a red herring
(`CreatureMode` paperdoll renderer, not world cells).
**⚠️ REAL remaining cause — GENERAL light over-saturation (NOT dungeon-specific; belongs to
the #79 indoor-lighting umbrella).** Screenshot + `[light-detail]` probe (`9e809bc`): torches
read **`intensity=100`** (+ garbage `cone`). Our shader does `Diffuse = color × intensity`
`color × 100` → every lit surface blows out to white = the hard "spotlight" disks. Retail's
`config_hardware_light` (0x0059adc) uses the SAME math (`Diffuse = (color/255) × intensity`)
and is NOT blown out → **retail's intensity is ~1.0; we are mis-reading the dat
`LightInfo.Intensity`** (likely a DatReaderWriter field/type bug — its source is a compiled
NuGet, not vendored, so unconfirmed). Over-saturates EVERY light (houses + outdoors + dungeons —
matches the user's "same issue everywhere; retail is uniform"). **DO NOT ad-hoc `÷100`
(forbidden workaround, risks the frozen outdoor/building lighting).** Proper fix = pin the
dat-format (raw-byte inspect a `LightInfo` / get the DatReaderWriter source) → correct the
intensity read → fixes the general spotty lighting everywhere. GENERAL engine-lighting work,
beyond G.3 dungeon scope. Separately: dungeon FPS 1430 (WB-DIAG ~22K draws/frame — heavy
cell-geometry draw count / poor instancing — a general rendering-perf task; the 8-light
selection also added a per-frame 2227-light sort that should become a partial-select).
**Severity:** HIGH (any far/dungeon teleport is unusable)
**Filed:** 2026-06-13 (M1.5 dungeon-demo gate attempt — meeting-hall portal)
**Component:** physics/streaming — teleport-arrival snap vs async landblock hydration