Part of #776 — SOLID architecture debt umbrella.
Phase: P1 · Finding: M6
Problem
modules/world-runtime/src/world.zig:717-831 embeds ~115 lines of dense triple-nested voxel iteration (lpvCollectLights, lpvBuildOcclusionGrid) directly in the World facade. A lighting subsystem does not belong in the facade.
Evidence
(Full evidence and file:line citations are in the umbrella #776.)
Fix
Extract into an LpvGridBuilder collaborator (e.g. modules/engine-lighting/src/lpv_grid_builder.zig or a new world-runtime module). World holds/invokes it.
Verification
nix develop --command zig build test (includes shader validation)
- If rendering-touching: capture headless screenshot baseline before/after (
-Dskip-present)
- If behavior-preserving refactor: golden-output test must stay green
Constraints
- Small reviewable PR targeting
dev; conventional commit (refactor: / feat:)
- Preserve current behavior unless this issue explicitly changes it
- Keep worker-thread RHI isolation intact (no RHI calls off main thread)
Notes
World is otherwise a clean facade (delegates to WorldStreamer/Renderer/Mutation/LOD/Save). This is the main SRP leak.
Tracking: #776
Part of #776 — SOLID architecture debt umbrella.
Phase: P1 · Finding: M6
Problem
modules/world-runtime/src/world.zig:717-831embeds ~115 lines of dense triple-nested voxel iteration (lpvCollectLights,lpvBuildOcclusionGrid) directly in theWorldfacade. A lighting subsystem does not belong in the facade.Evidence
(Full evidence and
file:linecitations are in the umbrella #776.)Fix
Extract into an
LpvGridBuildercollaborator (e.g.modules/engine-lighting/src/lpv_grid_builder.zigor a newworld-runtimemodule).Worldholds/invokes it.Verification
nix develop --command zig build test(includes shader validation)-Dskip-present)Constraints
dev; conventional commit (refactor:/feat:)Notes
Worldis otherwise a clean facade (delegates to WorldStreamer/Renderer/Mutation/LOD/Save). This is the main SRP leak.Tracking: #776