You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Rebuild ZigCraft's lighting and shadow pipeline around a coherent, testable architecture that delivers a cinematic saturated look, readable-dark caves, stable shadows, and a 60 FPS target at 1080p on midrange discrete GPUs.
This issue is the canonical tracker for the audit and phased overhaul. It supersedes the implementation plan in #143: several features proposed there now exist, but the active render path bypasses them and the underlying correctness problems remain.
Target
Cinematic, saturated art direction without a global cyan cast.
Dark caves that remain spatially readable near entrances and after adaptation.
One lighting model across all graphics presets; presets vary cost, not semantics.
Existing worlds remain loadable and are relit when the lighting algorithm version changes.
LPV remains quarantined/experimental until the baseline pipeline is correct and within budget.
High preset targets 60 FPS at 1080p on designated midrange hardware.
Audit summary
Severity
Finding
Evidence
Critical
Cave entrance illumination is generated and uploaded, but its intensity is ignored by the active shader. Zero sky/block light becomes exact black.
assets/shaders/vulkan/terrain.frag:460-515
Critical
simple_lighting_mode is hard-coded on, disabling PBR, SSAO, LPV, and volumetrics regardless of presets.
Goal
Rebuild ZigCraft's lighting and shadow pipeline around a coherent, testable architecture that delivers a cinematic saturated look, readable-dark caves, stable shadows, and a 60 FPS target at 1080p on midrange discrete GPUs.
This issue is the canonical tracker for the audit and phased overhaul. It supersedes the implementation plan in #143: several features proposed there now exist, but the active render path bypasses them and the underlying correctness problems remain.
Target
Audit summary
assets/shaders/vulkan/terrain.frag:460-515simple_lighting_modeis hard-coded on, disabling PBR, SSAO, LPV, and volumetrics regardless of presets.modules/game-ui/src/screens/world.zig:355-360,world_frame_params.zig:46-95modules/worldgen-common/src/lighting_computer.zig:98-138,318-358modules/world-runtime/src/lighting_engine.zig:23-70,195-245lighting_engine.zig:94-104,chunk_serializer.zig:15-25world_mutation.zig:51-81,chunk_queue_coordinator.zig:493-589csm.zig:92-110,terrain.frag:680-727rhi_resource_setup.zig:25-67,render_graph.zig:264-293shadow.vert:43-52,shadow.frag:1-9sky.frag:34-69,rhi_shadow_bridge.zig:4-9post_process.frag:72-104,vulkan_swapchain.zig:119-192terrain.frag:489-503,atmosphere/config.zig:10-15,post_process.frag:107-115terrain.frag:767-773ssao.frag:18-76mesh.comp:30-37,188-199Architectural decision
Keep the Vulkan resource ownership, render graph, reverse-Z convention, atmosphere timing, and packed 4-bit skylight/RGB block-light storage.
Rewrite these cohesive units rather than tuning around their contradictions:
Target data flow:
Phase tracking
Child issues are ordered dependencies and should land as small PR series targeting
dev.Global acceptance criteria
Constraints
nix develop --command.Baseline verification
nix develop --command zig build test nix develop --command zig build -Dskip-present nix develop --command zig build test-robustness nix develop --command zig build run -Dskip-present -Dshadow-test-scene -Dscreenshot-path=screenshots/shadow-test.png -Dscreenshot-frame=180 nix develop --command zig build benchmark -Doptimize=ReleaseFast -Dbenchmark-preset=high -Dbenchmark-duration=60 -Dbenchmark-output=benchmark-high-release.json