fix: unify terrain lighting model#908
Conversation
kcov coverageLine coverage ran for this PR and uploaded a non-blocking report artifact named |
📋 SummaryPR #908 closes #901 by removing the forced 📌 Review Metadata
🔴 Critical Issues (Must Fix - Blocks Merge)None identified.
|
| Principle | Score | Notes |
|---|---|---|
| Single Responsibility | 8 | One lighting function replaces four; clear separation of direct/indirect terms. |
| Open/Closed | 7 | New model is feature-gated by existing settings, but preset defaults changed. |
| Liskov Substitution | 8 | No inheritance hierarchy affected; shader inputs remain compatible. |
| Interface Segregation | 8 | FrameRenderParams is simplified by removing simple_lighting_enabled. |
| Dependency Inversion | 7 | RHI still consumes concrete settings; reasonable for this layer. |
| Average | 7.6 |
🎯 Final Assessment
Overall Confidence Score: 85%
Confidence Breakdown:
- Code Quality: 90% (clean, focused refactor; removes more code than it adds)
- Completeness: 85% (addresses the main [Lighting Overhaul][Phase 3] Unify terrain lighting, atmosphere, and output #901 scope; some visual acceptance criteria like windowed/headless equivalence are not independently verified)
- Risk Level: 30% (shader changes always carry visual/regression risk, but tests pass and the change is well-scoped)
- Test Coverage: 80% (existing tests compile and pass; no new unit tests added for the lighting function)
Merge Readiness:
- All critical issues resolved
- SOLID average score >= 6.0
- Overall confidence >= 60%
- No security concerns
- Tests present and passing (if applicable)
Verdict:
MERGE - The PR correctly unifies the terrain lighting model, removes the forced simple-lighting override, and passes the build/test pipeline with no critical or high-priority issues.
Machine Readable Verdict
{
"reviewed_sha": "54a3e6d6e4356359a9df8a703d08e9e6c86e44d6",
"critical_issues": 0,
"high_priority_issues": 0,
"medium_priority_issues": 0,
"overall_confidence_score": 85,
"recommendation": "MERGE"
}
Summary\n- remove the forced simple-lighting override and restore the shared feature settings\n- render textured terrain, fallback terrain, and LOD terrain through one Lambert plus dielectric GGX lighting equation\n- restrict AO/SSAO to indirect diffuse, preserve RGB block light, fix camera-relative view vectors/TBN handedness, and remove mandatory lush grading\n\n## Verification\n- nix develop --command zig build test\n- nix develop --command zig build test-integration\n- nix develop --command zig build run -Dskip-present -Dauto-world=normal -Dstartup-diagnostic-seconds=5\n\nCloses #901