Repository navigation
lighting: fog-pass pipelines take the one sun-shadow receiver model by default (stage 2 of #4965) (#5123) - #5202
Conversation
jakildev
left a comment
There was a problem hiding this comment.
Review — lighting: fog-pass pipelines take the one sun-shadow receiver model by default (stage 2 of #4965) (#5123)
Verdict: approve
The child diff is internally consistent with the approved stack base: the default route flip, fog-once composition, conservative early-depth bound, probe migration, backend twins, and mutation coverage line up with the plan and its A1 correction.
Stacked on #5200 (cross-author). Reviewing the child diff only — upstream is approved separately.
Acceptance (issue #5123)
8 of 9 criteria met. Criterion 7 is unverifiable on this Metal host: the new depth_greater GLSL path and the fog-arm crossing still need the OpenGL catch-up run requested by the plan.
Checked
- Read the complete PR and issue #5123 threads, including the plan, A1 correction, evidence, commits, checks, and inline comments (none).
- Reviewed the child diff at
44a47bc57acd24edcecaeb74de5c8f42c458b8a4against approved stack base #5200 (2a3bcd69fa7182497ee8d6dffbbe22d3e52159ca). fleet-build --detach --target IrredenEngineTest: terminal job20261119T170540Z-build-0c6f45succeeded, exit 0.fleet-run IrredenEngineTest --gtest_filter='SurfaceFogRoute.*:PerAxisSurfaceLighting*': 16/16 passed.- Python harnesses: scatter visibility 5/5, yaw crossing 17/17, cardinal surface lighting 5/5. Per-axis surface lighting passed 2/3; its binding-namespace compile failure reproduces identically on the approved stack base and is inherited (#5191).
- Current CI red is not introduced by this child: render-harness reports that same inherited binding failure, while fleet-tests failed only
test_fleet_queue_list.shoutside this diff. Linux build and perf gate were still pending when reviewed.
Test plan the author should run before merge
- Complete the OpenGL catch-up:
scripts/render-yaw-crossing-metric.py capture --fog-reveal 16, including compilation/execution of the new GLSL conservative-depth path.
🤖 Reviewed by Codex GPT-5 (review-pr skill)
Opus recheck required: core render routing and GPU conservative-depth semantics need final review, and the new GLSL path remains unexecuted on an OpenGL driver.
Perf gateHead host slug: perf comparison: 622ec2a → 4f29c7e-cibaseline: host calibration
thresholds: regress ≥ 10%, improve ≥ 5% voxel cull effectiveness
frame timing (ms)
GPU frame timing (ms; separate from stage samples)
GPU stage timing (avg ms per sampled invocation)
top CPU systems by avg ms (head)
|
| pipeline | system | avg ms (base→head) |
|---|---|---|
| RENDER | SingleVoxelToCanvasFirst |
220.332 → 221.462 (+0.5%) |
| RENDER | ComputeLightVolume |
25.801 → 25.879 (+0.3%) |
| RENDER | CanvasToFramebuffer |
14.533 → 25.332 (+74.3%) ⚠ |
| UPDATE | FogRevealEval |
8.528 → 7.572 (-11.2%) ↓ |
| RENDER | BakeSunShadowMap |
5.893 → 6.029 (+2.3%) |
| UPDATE | PropagateTransform |
3.649 → 3.705 (+1.5%) |
| RENDER | ComputeVoxelAO |
2.630 → 2.881 (+9.5%) |
| UPDATE | LuaWaveStateToOffset |
2.998 → 2.829 (-5.6%) ↓ |
target=IRLuaPerfGrid,zoom=4,sub_mode=full,sub_base=1
| pipeline | system | avg ms (base→head) |
|---|---|---|
| RENDER | SingleVoxelToCanvasFirst |
722.030 → 725.702 (+0.5%) |
| RENDER | CanvasToFramebuffer |
13.772 → 36.083 (+162.0%) ⚠ |
| RENDER | ComputeLightVolume |
23.044 → 21.912 (-4.9%) |
| UPDATE | FogRevealEval |
7.590 → 7.260 (-4.3%) |
| RENDER | ComputeVoxelAO |
6.878 → 7.041 (+2.4%) |
| RENDER | BakeSunShadowMap |
5.167 → 5.129 (-0.7%) |
| UPDATE | PropagateTransform |
3.482 → 3.594 (+3.2%) |
| RENDER | UpdateVoxelSetChildren |
2.462 → 2.914 (+18.4%) ⚠ |
target=IRPerfGrid,zoom=1,sub_mode=full,sub_base=1
| pipeline | system | avg ms (base→head) |
|---|---|---|
| RENDER | SingleVoxelToCanvasFirst |
236.216 → 239.026 (+1.2%) |
| RENDER | CanvasToFramebuffer |
14.572 → 37.338 (+156.2%) ⚠ |
| RENDER | ComputeSunShadow |
35.942 → 31.316 (-12.9%) ↓ |
| RENDER | ComputeLightVolume |
24.511 → 23.159 (-5.5%) ↓ |
| RENDER | LightingToTrixel |
18.975 → 19.094 (+0.6%) |
| RENDER | BakeSunShadowMap |
8.014 → 8.350 (+4.2%) |
| UPDATE | FogRevealEval |
7.175 → 7.666 (+6.8%) |
| UPDATE | PropagateTransform |
4.643 → 4.705 (+1.3%) |
target=IRPerfGrid,zoom=4,sub_mode=full,sub_base=1
| pipeline | system | avg ms (base→head) |
|---|---|---|
| RENDER | SingleVoxelToCanvasFirst |
1093.643 → 1107.811 (+1.3%) |
| RENDER | CanvasToFramebuffer |
13.456 → 45.302 (+236.7%) ⚠ |
| RENDER | ComputeLightVolume |
24.729 → 22.017 (-11.0%) ↓ |
| UPDATE | FogRevealEval |
7.599 → 7.237 (-4.8%) |
| RENDER | ComputeVoxelAO |
5.789 → 5.959 (+2.9%) |
| RENDER | BakeSunShadowMap |
5.163 → 5.375 (+4.1%) |
| UPDATE | PropagateTransform |
4.736 → 4.824 (+1.9%) |
| RENDER | UpdateVoxelSetChildren |
2.764 → 3.107 (+12.4%) ⚠ |
jakildev
left a comment
There was a problem hiding this comment.
Opus recheck — lighting: fog-pass pipelines take the one sun-shadow receiver model by default
Verdict: approve
Sonnet flagged core render routing and GPU conservative-depth semantics; on closer read I confirm the implementation is internally consistent across the affected route selection, fog composition, GLSL, and Metal paths. I found no child-diff defect.
Stacked on #5200 (cross-author). Reviewing the child diff only — upstream is approved separately.
Acceptance (issue #5123)
8 of 9 criteria are demonstrated. Criterion 7 remains unverifiable on this Metal host: the new GLSL depth_greater path and fog-reveal crossing still need the requested OpenGL catch-up. The existing fleet:needs-windows-smoke label preserves that requirement.
Checked
- Read the complete PR and issue #5123 threads, including the plan and A1 correction, commits, checks, prior review, author follow-ups, and inline comments (none).
- Reviewed exact child diff
44a47bc57acd24edcecaeb74de5c8f42c458b8a4against approved stack base #5200 at2a3bcd69fa7182497ee8d6dffbbe22d3e52159ca. - Confirmed the unset
enabledFordefault, fog-once composition, eager fog shader twins with late-registry fallback, and per-frame fog framebuffer resolution remain coherent through the route lifecycle. - Confirmed the conservative early-depth bound selects the nearest transformed corner, subtracts the four tie bands, clamps, and maps equivalently to GLSL clip depth and Metal
[0,1]depth. The fragment outputs anddepth_greaterdeclarations agree on both backends. - Confirmed the composited-shadow probe's pixel/canvas/depth-row mapping and off/on frame sequence measure the intended fog-pass receiver behavior.
fleet-run IrredenEngineTest --gtest_filter='SurfaceFogRoute.*:PerAxisSurfaceLighting*': 16/16 passed (RESULT=CLEAN).- Python mutation suites: 29/30 passed. The sole binding-namespace compile failure is unchanged in the relevant code and is the inherited #5191 failure; conservative-depth probes executed 320,000 fragments per backend with the expected 235 out-of-range faces.
python3 scripts/shader_parity_audit.py: clean (171 GLSL, 158 Metal, five allowlisted exceptions).git diff --checkpassed. Live Linux build, shader parity, and perf gate are green. The remaining render-harness and fleet-test failures are the tracked inherited #5191 and #5192 failures, outside this child diff.
Test plan before merge
- Complete the OpenGL catch-up:
scripts/render-yaw-crossing-metric.py capture --fog-reveal 16, including compilation and execution of the new GLSL conservative-depth path.
🤖 Reviewed by Codex GPT-5 (review-pr skill)
|
Cross-host smoke OK on windows (fresh checkout + IRShapeDebug --auto-screenshot 10 — build clean, RESULT=CLEAN exit 0, no shader compile warnings; only log warning is a pre-existing profiler tagGpuStage notice for guiToScreen in a file this PR does not touch). |
…default An unset surface-lighting switch now admits the surface routes on every pipeline, so a pipeline that registers FOG_TO_TRIXEL lights voxel faces with one sun query per fragment at cardinal and rotating yaws and composes fog once in the composite. Line-of-sight sources, glitch subjects, debug overlays and an explicit off keep the compute fallback. The per-axis scatter rasterizes each face at a depth no greater than any depth its fragments write and declares that bound on the fragment depth output, so the rasterizer can reject an occluded fragment before it takes a sun query. Written depths and the image are unchanged. The fog-composing lit programs compile when the composite system is created on a fog pipeline, not on its first frame. IRFogDemo's ceiling-shadow probe reads the composited frame on a surface route; modes whose probes read compute-route intermediates pin the switch off. The yaw crossing metric gains a --fog-reveal arm. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…nd gate The design note states the routes a fog-pass pipeline takes, the fallbacks that remain, the fixtures pinned to the compute route, and why early depth rejection was chosen over the visibility prepass. The stage 2 perf directory holds the interleaving driver and the three Release suites behind the cost gate. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…n PRs Three open PRs edit the yaw-crossing row of the validation table and the OpenGL bullet of the design note. The table row goes back to the base text, and the design note keeps the line that borders the other PR's hunk. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
44a47bc to
18452fc
Compare
Perf gateHead host slug: perf comparison: 1600afd → fcfa7db-cibaseline: host calibration
thresholds: regress ≥ 10%, improve ≥ 5% voxel cull effectiveness
frame timing (ms)
GPU frame timing (ms; separate from stage samples)
GPU stage timing (avg ms per sampled invocation)
top CPU systems by avg ms (head)
|
| pipeline | system | avg ms (base→head) |
|---|---|---|
| RENDER | SingleVoxelToCanvasFirst |
180.112 → 184.784 (+2.6%) |
| RENDER | ComputeLightVolume |
24.096 → 23.967 (-0.5%) |
| RENDER | CanvasToFramebuffer |
11.391 → 22.936 (+101.4%) ⚠ |
| RENDER | BakeSunShadowMap |
6.815 → 6.960 (+2.1%) |
| UPDATE | FogRevealEval |
3.825 → 3.927 (+2.7%) |
| UPDATE | PropagateTransform |
2.917 → 2.833 (-2.9%) |
| RENDER | ComputeVoxelAO |
2.298 → 2.562 (+11.5%) ⚠ |
| RENDER | UpdateVoxelSetChildren |
1.813 → 1.881 (+3.8%) |
target=IRLuaPerfGrid,zoom=4,sub_mode=full,sub_base=1
| pipeline | system | avg ms (base→head) |
|---|---|---|
| RENDER | SingleVoxelToCanvasFirst |
563.873 → 576.613 (+2.3%) |
| RENDER | CanvasToFramebuffer |
10.526 → 32.213 (+206.0%) ⚠ |
| RENDER | ComputeLightVolume |
21.208 → 22.014 (+3.8%) |
| RENDER | BakeSunShadowMap |
5.858 → 6.253 (+6.7%) |
| RENDER | ComputeVoxelAO |
5.546 → 6.061 (+9.3%) |
| UPDATE | FogRevealEval |
3.819 → 3.816 (-0.1%) |
| UPDATE | PropagateTransform |
2.644 → 2.687 (+1.6%) |
| RENDER | UpdateVoxelSetChildren |
1.906 → 1.969 (+3.3%) |
target=IRPerfGrid,zoom=1,sub_mode=full,sub_base=1
| pipeline | system | avg ms (base→head) |
|---|---|---|
| RENDER | SingleVoxelToCanvasFirst |
199.623 → 200.122 (+0.2%) |
| RENDER | CanvasToFramebuffer |
12.228 → 32.848 (+168.6%) ⚠ |
| RENDER | ComputeSunShadow |
33.508 → 26.713 (-20.3%) ↓ |
| RENDER | ComputeLightVolume |
23.367 → 24.328 (+4.1%) |
| RENDER | LightingToTrixel |
15.265 → 16.084 (+5.4%) |
| RENDER | BakeSunShadowMap |
8.484 → 8.879 (+4.7%) |
| UPDATE | PropagateTransform |
3.740 → 3.870 (+3.5%) |
| RENDER | FogToTrixel |
3.592 → 3.790 (+5.5%) |
target=IRPerfGrid,zoom=4,sub_mode=full,sub_base=1
| pipeline | system | avg ms (base→head) |
|---|---|---|
| RENDER | SingleVoxelToCanvasFirst |
840.096 → 874.563 (+4.1%) |
| RENDER | CanvasToFramebuffer |
10.803 → 45.441 (+320.6%) ⚠ |
| RENDER | ComputeLightVolume |
21.870 → 22.617 (+3.4%) |
| RENDER | BakeSunShadowMap |
6.192 → 6.360 (+2.7%) |
| RENDER | ComputeVoxelAO |
4.609 → 4.906 (+6.4%) |
| UPDATE | PropagateTransform |
3.772 → 3.856 (+2.2%) |
| UPDATE | FogRevealEval |
3.608 → 3.762 (+4.3%) |
| UPDATE | PeriodicIdle |
2.597 → 2.780 (+7.0%) |
The A to B, B to C and C to C1 arms each held several runtime commits, so a flat net step could hide one commit's cost behind another's recovery. Session s11 splits them: 14 arms, one runtime commit each, four alternating rounds at yaw 45 degrees, all 56 runs QUIET=guarded. No step reaches 0.15 ms on the frame or 0.07 ms on the GPU envelope. The #5202 Decisions row now reads pending the owner instead of accepted, since the owner has not yet answered the question on issue 5236. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Summary
Voxel faces on a pipeline with a fog pass (
IRPerfGrid,IRFogDemo,IRLightingCombined,IRCanvasStress --fog-revealand the rest) now take one sun query per fragment at cardinal and rotating yaws, the same receiver fog-free pipelines got in stage 1, with fog composed once in the composite. A shadow edge on such a pipeline no longer steps when the camera crosses a cardinal yaw.The per-axis scatter also rasterizes each face at a lower bound of its written depth, so the rasterizer drops occluded fragments before they take a sun query. That puts the new default inside the 1.10 frame gate on the million control without changing a pixel of either model.
Screenshots
fog16_receiver_yaw0.6 —
IRCanvasStress --fog-reveal 16at camera yaw 0.6 rad, receiver top enlarged 3×. Before, the cube's shadow is a block of whole faces; after, it is the cube's own outline.3 more pairs
fog16_receiver_yaw0 — the same receiver at a cardinal yaw; the edge follows the fragment instead of the stored micro-face.
fog_ceiling_shadow9 —
IRFogDemo --ceiling-shadow, cardinal.perf_grid_cycle_zoom4_rot —
IRPerfGridstatic cycle, rotating.Acceptance evidence
Metal, Apple M4 Max. "Parent" is the stack base
2a3bcd69fbuilt in its own worktree and captured in the same session.python3 scripts/render-yaw-crossing-metric.py capture --fog-reveal 16 --output <dir>RESULT=PASS(32 / 24 / 16 / 16), all five framesfog=compose. ParentRESULT=FAIL(0 / 968 / 968 / 0),fog=fallback. Head without the flagRESULT=PASS.python3 scripts/tests/test_render_yaw_crossing_metric.pyfleet-run IrredenEngineTest --gtest_filter='SurfaceFogRoute.*:PerAxisSurfaceLighting*'UnsetSwitchIsOn.python3 scripts/tests/test_render_cardinal_surface_lighting.py,python3 scripts/tests/test_render_per_axis_surface_lighting.pydocs/perf/voxel-receiver-yaw-continuity/stage2/driver.py.txt, three suites, Release, 540 accepted runs, allRESULT=CLEANandQUIET=guarded=0equals parent default on 109 of 109. Head default equals parent=1on 104 of 104 the parent can capture. The five crossing frames are identical both ways.windows-debugrows offog_demoleft stale. List in the design note.--fog-reveal 16,scripts/render_receiver_shadow_polygon.pydocs/design/voxel-receiver-yaw-continuity.mdpython3 scripts/render-verify.py --target IRFogDemo --no-buildfleet-run IRFogDemo --auto-screenshot 10 --ceiling-shadow [--no-sun-shadows]fog=compose,reading=composited, lit cap witnesses 0/10, 0/8, 0/8, exit 0. Control: 10/10, 8/8, 8/8,FOG-SHADOW-PROBE FAIL, exit 1.python3 scripts/render-verify.py --target IRPerfGrid --no-build,--target IRLuaPerfGridpython3 scripts/light-verify.py --if-changedpython3 scripts/tests/test_render_scatter_visibility.pyReviewer notes
Plan departures
FOG_TO_TRIXELwrites.--ghost-policyjoins that list.--ceiling-shadow-curvedis pinned for a different intermediate: it compares shadow reach under the fog rim, which only the sampled sun-shadow factors hold.--ceiling-shadowis not pinned.enabledForlost itsfogPassRegisteredparameter. The stage 1 mutationunset-ignores-fog-passis inverted tounset-follows-fog-passand applied at the call site.-unlitcases, which keep the compute route by design (a debug overlay is a retained fallback). The profiling-off preset times no stages on either arm, and on the fog-free matrix both arms carry the stage, since stage 1 already put it there.=1cannot capture five rows, because its--ceiling-shadowand--ghost-policyprobes exit before the shot on that route. The two ceiling-shadow rows are identical to a parent build with that probe unregistered; the three ghost-policy rows are pinned on the head and identical to the parent's default.Notes for reviewer
layout(depth_greater), the vertex clip z) are written but not compiled on this host. The bound is flat per face so it does not depend on how a driver interpolates its own depth.docs/design/voxel-receiver-yaw-continuity.mdcitesdocs/evidence/fog-surface-lighting-gl-native/README.md, which the stack parent adds.IRFogDemo --ceiling-shadowtoggles sun shadows off for one warmup frame. Its two rows are byte-identical to the parent opt-in capture taken without that toggle.IRCanvasStress: the fog-composing lit programs and the fog pass's surface kernel compiled on first use. Both now compile at system creation; the tables are from the rerun after that.--fog-revealarm. Three open PRs edit that row, so the arm is documented in the script's own help and the design note.Open-PR overlap
fleet-pr-overlap --base claude/4813-gl-fog-native-placements:VERDICT: overlap, every shared path trial-merges clean.Closes #5123
🤖 Generated with Claude Code