Blacksite/docs/adr/0011-scene-sun-policy.md
Rbanh f29712d158
Some checks are pending
CI / Format, lint, test, build (push) Waiting to run
Initial project import
2026-06-05 21:44:45 -04:00

22 lines
1.2 KiB
Markdown

# ADR 0011: Scene lighting policy (project sun vs scene sun)
## Status
Accepted
## Context
A single scene-authored directional `LightDesc` hides the runtime `ProjectSun`, which can make outdoor levels appear black if lux values are wrong. Project Settings ambient/sun did not always apply live after **Apply**.
## Decision
- **`ProjectSun`** is the default outdoor directional; scene-authored directionals override it (existing `sync_project_sun_visibility` behavior).
- **Editor commands** (Scene menu + Rendering Diagnostics): *Use project sun* (remove scene directionals) and *Bake scene sun from project* (spawn directional `LightDesc` from current `sun_illuminance`).
- On **`ProjectSettingsChanged`**, the editor applies ambient light, `sync_project_sun_illuminance`, and `sync_project_sun_visibility`; render view refreshes via existing `ProjectSettings` change detection.
- Legacy directional lux < 1000 is corrected in **schema migration** to `100_000` lux (documented default), not at hydration time.
## Consequences
- Status/diagnostics UI should surface sun override state (Rendering Diagnostics panel).
- Designers use authoring `LightDesc` units: lumens (point/spot), lux (directional).