Round-2 quick wins: water grazing, backlit trees, fog, shafts, title centering#2
Conversation
… shafts, title Validated on the audit poses (region-luma vs the round-2 baselines): - water at grazing: clean-water rect now 1.00x sky luma (was 1.16-1.23x — the river measured BRIGHTER than the sky); the fat white band at the waterline is gone - backlit treeline: canopy/background 1.35 (audit) -> 1.26, and crowns now read as shaded volumes (lit tops, darker sides, saturated green) instead of flat pale-mint blobs; the remainder is sun-struck top facets water.wgsl (audit F2): - re-land the lost grazing calibration as min(schlick, 0.60) - lift reflected rays off the horizon (r.y >= 0.08): the GGX-prefiltered horizon mip is a pale wash that does not exist in the real sky - fade crest foam by view angle (measured ~5% of the milk stripe) - screen UV from the fragment position, not a per-vertex perspective divide (wrong snapshot texel at grazing distances) tree.wgsl (audit F3): - crown self-occlusion on the sky fill (sides 35%, tops 100%) — env irradiance by normal alone gave side facets half the sky dome - rim-gated, shadowed, cloud-modulated leaf transmission (a full-crown version brightens exactly the silhouettes the audit flagged) - direct term carries sun_dir.w; leaf shadow floor deepens with distance main.ts: - fog heightRef 0 -> -0.6, density 0.024 -> 0.016: the reference sat at water level, so grazing views integrated the densest slab down the whole valley — that WAS the visible milk band (it spilled over banks) - sun shafts 0.4/0.96 -> 0.18/0.90 (up to ~+0.14 HDR silhouette veil) - title centering via measureText (exact in the current engine; the 0.58 hand estimate was itself the off-centering) - stop engaging the drifted inline water fallback (stale lighting AND a mismatched params layout); SH-005 codegen is the durable fix Adds docs/audit-round2.md — the full round-2 audit with the evidence index (tools/.testout/audit2/) these numbers come from.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (5)
📝 WalkthroughWalkthroughThis PR reworks tree shader shadow/backlit/ambient lighting, fixes water shader screen-space UV derivation and reflection/Fresnel/foam calculations, retunes fog and sun-shaft parameters in main.ts, forces file-compiled water material use, corrects title-screen text centering via measureText, adds a Round-2 audit document, and ignores main.pdb. ChangesRound-2 Audit Fixes
Estimated code review effort: 4 (Complex) | ~45 minutes Sequence Diagram(s)Not applicable — the changes are shader math tuning, parameter adjustments, and documentation without multi-component orchestration flow. Related Issues: No related issues were provided in the summary. Related PRs: No related PRs were provided in the summary. Suggested labels: shaders, tuning, documentation Suggested reviewers: Not enough information to suggest specific reviewers. 🐇 A rabbit hopped through leaves and tide, 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
Phase-1 visual fixes from the round-2 audit (report + evidence index included as
docs/audit-round2.md; baselines intools/.testout/audit2/). Every change is anchored to a measured finding and re-validated on the same camera poses at 4K.Measured results (before → after)
Water (
assets/materials/water.wgsl, audit F2)min(schlick, 0.60).r.y >= 0.08) — the GGX-prefiltered horizon mip is a pale wash that doesn't exist in the real sky.Trees (
assets/materials/tree.wgsl, audit F3)sun_dir.w(the 1.1× sun intensity was silently dropped); leaf shadow floor deepens with distance.main.ts
heightRef 0 → -0.6,density 0.024 → 0.016: the reference sat exactly at water level, so grazing views integrated the densest slab down the whole valley — that was most of the visible band (it spilled over dry banks too).0.4/0.96 → 0.18/0.90(up to ~+0.14 HDR additive veil on every sunward silhouette).measureText— verified exact in the current engine down to the binary; the 0.58 hand estimate was the off-centering.Follow-ups tracked
Engine-side siblings (duplicate cutout transmission block, 2D gamma, SSR/IBL crossfade, sharpen knob) land separately; see audit F-numbers in the report.
Summary by CodeRabbit
Bug Fixes
New Features
Documentation