Skip to content

[Lighting Overhaul][Phase 5] Remove legacy paths and enforce regression gates #904

Description

@MichaelFisher1997

Parent

Part of #898.

Depends on

#900, #899, #903, #901, and #902.

Goal

Remove superseded paths, lock visual/performance regressions behind automated gates, and roll the overhaul out as the sole supported lighting path.

Scope

  • Delete duplicated worldgen/runtime lighting implementations after migration.
  • Delete entrance-light storage/packing/shader code and stale save handling after compatibility coverage exists.
  • Remove dead PCSS/blocker-search helpers, unused sun-shaft functions, stale shadow debug APIs, and duplicated UBO definitions.
  • Remove simple/legacy terrain lighting branches and obsolete quality toggles.
  • Keep GPU meshing disabled or repair its vertex stride, light inputs, AO, and output parity before enabling it.
  • Add deterministic visual regression captures for all lighting scenarios and preset tiers.
  • Add benchmark thresholds for shadow, opaque, SSAO, volumetric, draw-call, and total GPU timings.
  • Tune LOW/MEDIUM/HIGH/ULTRA/EXTREME sample counts and resource sizes while preserving visual semantics.
  • Document the new lighting architecture, debug channels, world relight behavior, and preset cost model.
  • Remove temporary migration code only when the supported save compatibility window permits it.

Acceptance criteria

  • Only one production terrain lighting model remains.
  • No duplicate voxel propagation implementation remains.
  • Shader/CPU data contracts have automated ABI checks.
  • Deterministic visual regression scenes cover caves, emitters, chunk seams, foliage, water, LOD, day/night, and cascade transitions.
  • High preset sustains the agreed 1080p/60 FPS target on designated midrange hardware.
  • No phase causes more than an approved 10% total GPU regression versus its recorded baseline.
  • Documentation describes architecture, diagnostics, migration, and tuning controls.

Final verification

nix develop --command zig fmt src modules
nix develop --command zig build test
nix develop --command zig build -Doptimize=ReleaseFast
nix develop --command zig build test-integration
nix develop --command zig build test-robustness
nix develop --command zig build run -Dskip-present -Dauto-world=normal -Dstartup-diagnostic-seconds=5
nix develop --command zig build benchmark -Doptimize=ReleaseFast -Dbenchmark-preset=high -Dbenchmark-duration=60 -Dbenchmark-output=lighting-overhaul-final-high.json

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions