Skip to content

lighting: fog-pass pipelines take the one sun-shadow receiver model by default (stage 2 of #4965) (#5123) - #5202

Merged
jakildev merged 3 commits into
masterfrom
claude/5123-fog-pass-receiver-default
Nov 19, 2026
Merged

jakildev merged 3 commits into
masterfrom
claude/5123-fog-pass-receiver-default

Conversation

@jakildev

Copy link
Copy Markdown
Owner

Summary

Voxel faces on a pipeline with a fog pass (IRPerfGrid, IRFogDemo, IRLightingCombined, IRCanvasStress --fog-reveal and 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 16 at 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.

Before After
before after
3 more pairs

fog16_receiver_yaw0 — the same receiver at a cardinal yaw; the edge follows the fragment instead of the stored micro-face.

Before After
before after

fog_ceiling_shadow9 — IRFogDemo --ceiling-shadow, cardinal.

Before After
before after

perf_grid_cycle_zoom4_rot — IRPerfGrid static cycle, rotating.

Before After
before after

Acceptance evidence

Metal, Apple M4 Max. "Parent" is the stack base 2a3bcd69f built in its own worktree and captured in the same session.

Criterion Check run Observed
1. Crossing, positive fire python3 scripts/render-yaw-crossing-metric.py capture --fog-reveal 16 --output <dir> Head RESULT=PASS (32 / 24 / 16 / 16), all five frames fog=compose. Parent RESULT=FAIL (0 / 968 / 968 / 0), fog=fallback. Head without the flag RESULT=PASS.
1. Passthrough and no-fog-pass error python3 scripts/tests/test_render_yaw_crossing_metric.py 17 tests pass
2. Routes, native fleet-run IrredenEngineTest --gtest_filter='SurfaceFogRoute.*:PerAxisSurfaceLighting*' Head 16 of 16 pass. Same test file built in the parent tree: 5 fail, the four unset-on-fog-pass route cases and UnsetSwitchIsOn.
2. Routes, Python harnesses python3 scripts/tests/test_render_cardinal_surface_lighting.py, python3 scripts/tests/test_render_per_axis_surface_lighting.py Cardinal: 5 tests pass. Per-axis: the readiness test passes; the binding test fails as it does on the parent (#5191). Each harness fails under the mutation that restores the fog-pass dependence.
3. Cost docs/perf/voxel-receiver-yaw-continuity/stage2/driver.py.txt, three suites, Release, 540 accepted runs, all RESULT=CLEAN and QUIET=guarded Million control: 12 of 12 frame and steady rows pass, 1.007 to 1.063. Fogged shadowbox: 40 of 40, highest 1.078. Fog-free shadowbox: 40 of 40, highest 1.081. One case in each shadowbox matrix read above 1.10 at five pairs and needed more (notes).
4. Exactness 109 rows × 4 arms, RGB compare Head =0 equals parent default on 109 of 109. Head default equals parent =1 on 104 of 104 the parent can capture. The five crossing frames are identical both ways.
5. Moved rows head default against parent default 41 of 109 moved; 28 macOS references re-blessed; 18 windows-debug rows of fog_demo left stale. List in the design note.
6. Cardinal rows at least as correct polygon set with --fog-reveal 16, scripts/render_receiver_shadow_polygon.py Head 0 missing, 0 excess, 0 unknown on all eight yaws. Parent 60 / 52 and 64 / 59 at cardinals, 18 / 638 and 32 / 650 between.
7. Both backends criterion 1 on this host Metal ran it. OpenGL: unverifiable on macOS, owed on a GL host (plan Decision 9).
8. Design note docs/design/voxel-receiver-yaw-continuity.md Routes, retained fallbacks, pinned fixtures, cost mechanism with alternatives, Release figures
9. Fog demo probes python3 scripts/render-verify.py --target IRFogDemo --no-build Default pass and 36 extra runs clean, 69 checks PASS
9. Ceiling-shadow probe and control fleet-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.
Other fog-pass references python3 scripts/render-verify.py --target IRPerfGrid --no-build, --target IRLuaPerfGrid 35 of 35 and 2 of 2 PASS
Lighting baselines python3 scripts/light-verify.py --if-changed all checks PASS
Early-depth bound python3 scripts/tests/test_render_scatter_visibility.py 5 tests pass on both shader dialects; five mutations of the bound fail
Reviewer notes

Plan departures

  • Decision 3 names the visibility prepass as the first candidate. Measured in Release it reads 1.07 to 1.09 on the million control, inside the gate with little margin, because it rasterizes every face twice. The exact cut shipped is early depth rejection in the single pass; the prepass stays opt-in. Figures are in the design note's cost mechanism section.
  • Decision 5's third arm applies: the depth bound is on every scatter program, so the fog-free shadowbox matrix was run too.
  • Decision 10 pins fixtures whose probes read FOG_TO_TRIXEL writes. --ghost-policy joins that list. --ceiling-shadow-curved is pinned for a different intermediate: it compares shadow reach under the fog rim, which only the sampled sun-shadow factors hold. --ceiling-shadow is not pinned.
  • enabledFor lost its fogPassRegistered parameter. The stage 1 mutation unset-ignores-fog-pass is inverted to unset-follows-fog-pass and applied at the call site.
  • Criterion 3 asks every head report to carry a surface-route stage and no parent report to. That holds for every timed run on a fog pipeline except the -unlit cases, 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.
  • Criterion 3 says at least five pairs. Six shadowbox cases whose ratio sat outside 0.91 to 1.10 after five pairs, in either direction, took five more, and one took twenty in all. The rule, every pair and a three-arm control for the one case that read high are in the stage 2 README.
  • Criterion 4: the parent with =1 cannot capture five rows, because its --ceiling-shadow and --ghost-policy probes 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

  • The GLSL twins (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.md cites docs/evidence/fog-surface-lighting-gl-native/README.md, which the stack parent adds.
  • IRFogDemo --ceiling-shadow toggles sun shadows off for one warmup frame. Its two rows are byte-identical to the parent opt-in capture taken without that toggle.
  • The first cost passes caught a 1.5 s first frame and a 0.29 s first cardinal frame on fogged 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.
  • With the fog demo's pins removed, the four pinned manifest modes render the same on the composed route as on the compute route (12 of 13 rows identical, one off by 1 on 992 pixels).
  • The validation table's yaw-crossing row does not name the --fog-reveal arm. 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.

#5101 docs/design/per-axis-trixel-canvas-rotation.md clean
#5124 docs/design/per-axis-trixel-canvas-rotation.md clean
#5131 docs/design/per-axis-trixel-canvas-rotation.md clean
#5131 engine/render/src/shaders/metal/ir_iso_common.metal clean
#5135 engine/prefabs/irreden/render/systems/system_trixel_to_framebuffer.hpp clean
#5135 scripts/tests/test_render_cardinal_surface_lighting.py clean
#5193 scripts/tests/test_render_per_axis_surface_lighting.py clean
#5195 docs/design/voxel-receiver-yaw-continuity.md clean
#5195 scripts/render-yaw-crossing-metric.py clean
#5195 scripts/tests/test_render_yaw_crossing_metric.py clean

Closes #5123

🤖 Generated with Claude Code

@jakildev jakildev added fleet:wip Work in progress — not ready for review fleet:author-claude Implementation last authored by Claude; route review to Codex labels Nov 19, 2026
@jakildev
jakildev added this pull request to stack #5203 November 19, 2026 16:59
@jakildev jakildev added fleet:authored-on-macos PR was authored and smoke-tested on macOS Metal backend and removed fleet:wip Work in progress — not ready for review labels Nov 19, 2026
@jakildev

Copy link
Copy Markdown
Owner Author

Follow-ups filed from this work: #5204 (an auto-profile yaw sweep sometimes witnesses one frame short, which cost 22 of 82 sweep launches in the cost suites) and #5205 (name the fog-reveal arm in the validation table's yaw-crossing row, held back here because three open PRs edit that row). — worker

@jakildev jakildev left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 44a47bc57acd24edcecaeb74de5c8f42c458b8a4 against approved stack base #5200 (2a3bcd69fa7182497ee8d6dffbbe22d3e52159ca).
  • fleet-build --detach --target IrredenEngineTest: terminal job 20261119T170540Z-build-0c6f45 succeeded, 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.sh outside 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.

@jakildev jakildev added fleet:needs-opus-recheck Sonnet flagged this PR for Opus recheck before merge fleet:needs-windows-smoke PR needs windows-debug build + smoke-run validation and removed fleet:reviewing-mac-pool-1 labels Nov 19, 2026
@github-actions

Copy link
Copy Markdown

Perf gate

Head host slug: linux-x86_64-xeon-6975p-c-03-0-vga

perf comparison: 622ec2a → 4f29c7e-ci

baseline: /home/runner/work/_temp/perf-baseline/history/linux-x86_64-xeon-6975p-c-03-0-vga/622ec2a4e3d8b8dffae4b249b935dcad3aee257a
head: /home/runner/work/IrredenEngine/IrredenEngine/save_files/perf/4f29c7efe-ci

host calibration

  • host: linux-x86_64-xeon-6975p-c-03-0-vga (matches baseline)
  • ref_ms: head 70.14 vs baseline 69.88 (load_factor 1.00×)
  • calibration target: 50.00 ms (informational)
  • baseline capture: perf-baseline@622ec2a4e (branch tip); master 4c35a9da0, finished 2026-11-19T04:20:10Z, 0.5 d before the head run, ref_ms 69.88
  • weighting: raw (class-matched capture; load_factor 1.00×; no calibration-scaling entry)
  • attribution: improvement withheld, stacked: merge base 2a3bcd69f is not on refs/remotes/origin/master, so the run measured the base branch's unmerged changes

thresholds: regress ≥ 10%, improve ≥ 5%

voxel cull effectiveness

cell ratio (base→head) avg visible total avg feeder
target=IRLuaPerfGrid,zoom=1,sub_mode=full,sub_base=1 1.000 → 1.000 (+0.0pp) 262144 → 262144 1024 → 1024 0 → 0
target=IRLuaPerfGrid,zoom=4,sub_mode=full,sub_base=1 0.598 → 0.598 (+0.0pp) 156637 → 156637 1024 → 1024 0 → 0
target=IRPerfGrid,zoom=1,sub_mode=full,sub_base=1 1.000 → 1.000 (+0.0pp) 262144 → 262144 1024 → 1024 0 → 0
target=IRPerfGrid,zoom=4,sub_mode=full,sub_base=1 0.975 → 0.975 (+0.0pp) 255592 → 255592 1024 → 1024 0 → 0

frame timing (ms)

cell avg p99
target=IRLuaPerfGrid,zoom=1,sub_mode=full,sub_base=1 443.80 → 436.36 (-1.7%) 1181.69 → 1189.11 (+0.6%)
target=IRLuaPerfGrid,zoom=4,sub_mode=full,sub_base=1 951.46 → 948.16 (-0.3%) 1722.43 → 1728.01 (+0.3%)
target=IRPerfGrid,zoom=1,sub_mode=full,sub_base=1 509.73 → 541.35 (+6.2%) 6897.09 → 8105.33 (+17.5%) ⚠
target=IRPerfGrid,zoom=4,sub_mode=full,sub_base=1 1346.20 → 1355.45 (+0.7%) 2038.19 → 2101.95 (+3.1%)

GPU frame timing (ms; separate from stage samples)

cell envelope (base→head) buffer spans (base→head) coverage (base→head)
target=IRLuaPerfGrid,zoom=1,sub_mode=full,sub_base=1 unavailable → unavailable unavailable → unavailable unavailable → unavailable
target=IRLuaPerfGrid,zoom=4,sub_mode=full,sub_base=1 unavailable → unavailable unavailable → unavailable unavailable → unavailable
target=IRPerfGrid,zoom=1,sub_mode=full,sub_base=1 unavailable → unavailable unavailable → unavailable unavailable → unavailable
target=IRPerfGrid,zoom=4,sub_mode=full,sub_base=1 unavailable → unavailable unavailable → unavailable unavailable → unavailable

GPU stage timing (avg ms per sampled invocation)

cell canvasClear voxelCompact voxelStage1 voxelCardinalElect voxelStage2 voxelSunFaces textToTrixel buildLightOcclusionGrid computeVoxelAO bakeSunShadowMap computeSunShadow computeLightVolume lightingToTrixel fogToTrixel trixelToFb resolvePerAxisScreenDepth fbToScreen cardinalSurfaceFb
target=IRLuaPerfGrid,zoom=1,sub_mode=full,sub_base=1 16.83→16.67 48.35→48.58 41.27→41.58 0.76→0.78 41.18→39.18 70.16→70.30 — 0.00→0.00 1.47→2.76 ⚠ 16.91→7.38 ↓ 14.27→0.43 ↓ 11.96→25.76 ⚠ 2.68→1.16 ↓ 0.96→0.97 0.16→0.17 — 6.60→6.67 0.00→0.19
target=IRLuaPerfGrid,zoom=4,sub_mode=full,sub_base=1 17.18→17.26 240.15→240.37 179.81→181.36 2.99→3.04 170.41→164.74 113.95→114.41 — 0.00→0.00 1.32→6.76 ⚠ 29.35→6.78 ↓ 12.71→0.34 ↓ 10.65→21.79 ⚠ 4.76→1.25 ↓ 1.02→1.02 0.16→0.15 ↓ — 6.31→6.36 0.00→0.28
target=IRPerfGrid,zoom=1,sub_mode=full,sub_base=1 15.76→15.55 56.05→56.95 44.23→45.15 6.63→6.82 37.15→36.79 65.54→65.13 1.28→1.32 0.00→0.00 4.28→4.71 ⚠ 40.34→37.12 ↓ 13.03→0.61 ↓ 29.54→41.00 ⚠ 4.90→4.49 ↓ 1.41→1.41 0.15→0.17 ⚠ 0.00→0.00 7.15→7.42 0.00→0.17
target=IRPerfGrid,zoom=4,sub_mode=full,sub_base=1 16.32→16.54 389.15→393.56 290.61→295.01 4.67→4.76 267.17→264.92 126.93→128.61 1.33→1.32 0.00→0.00 1.32→5.74 ⚠ 38.50→6.67 ↓ 13.89→0.35 ↓ 11.22→21.92 ⚠ 4.18→1.18 ↓ 1.17→1.20 0.14→0.16 ⚠ 0.00→0.00 6.09→6.46 0.00→0.54

top CPU systems by avg ms (head)

target=IRLuaPerfGrid,zoom=1,sub_mode=full,sub_base=1

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

Copy link
Copy Markdown
Owner Author

CI on this head: fleet-tests fails on test_fleet_queue_list.sh only, which is #5192; render-harness-tests fails on the per-axis binding test, which is #5191 (fix in #5193). Neither suite is touched by this change in the failing part. — worker

@jakildev jakildev left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 44a47bc57acd24edcecaeb74de5c8f42c458b8a4 against approved stack base #5200 at 2a3bcd69fa7182497ee8d6dffbbe22d3e52159ca.
  • Confirmed the unset enabledFor default, 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 and depth_greater declarations 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 --check passed. 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)

@jakildev jakildev added fleet:approved Fleet reviewer approved — ready for human merge and removed fleet:needs-opus-recheck Sonnet flagged this PR for Opus recheck before merge fleet:reviewing-mac-pool-1 labels Nov 19, 2026
@jakildev jakildev added fleet:verified-windows Cross-host smoke passed on windows-debug and removed fleet:needs-windows-smoke PR needs windows-debug build + smoke-run validation labels Nov 19, 2026
@jakildev

Copy link
Copy Markdown
Owner Author

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).

@evin-desktop-claude-app evin-desktop-claude-app Bot added the fleet:checks-red Info only: approved PR whose head has a failed check of its own; reconcile R12 adds and removes it label Nov 19, 2026
Base automatically changed from claude/4813-gl-fog-native-placements to master November 19, 2026 19:02
…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>
jakildev and others added 2 commits November 19, 2026 11:02
…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>
@jakildev
jakildev force-pushed the claude/5123-fog-pass-receiver-default branch from 44a47bc to 18452fc Compare November 19, 2026 19:02
@evin-mac-claude-app evin-mac-claude-app Bot removed the fleet:checks-red Info only: approved PR whose head has a failed check of its own; reconcile R12 adds and removes it label Nov 19, 2026
@jakildev
jakildev merged commit 7ed1e27 into master Nov 19, 2026
15 of 17 checks passed
@github-actions

Copy link
Copy Markdown

Perf gate

Head host slug: linux-x86_64-epyc-9v45-96-unknown

perf comparison: 1600afd → fcfa7db-ci

baseline: /home/runner/work/_temp/perf-baseline/history/linux-x86_64-epyc-9v45-96-unknown/1600afdc75aed2694fc947eb4acc7f42e4b2406b
head: /home/runner/work/IrredenEngine/IrredenEngine/save_files/perf/fcfa7db7b-ci

host calibration

  • host: linux-x86_64-epyc-9v45-96-unknown (matches baseline)
  • ref_ms: head 60.73 vs baseline 58.62 (load_factor 1.04×)
  • calibration target: 50.00 ms (informational)
  • baseline capture: perf-baseline@1600afdc7 (class-matched history capture, not the branch tip); master a914699df, finished 2026-11-17T18:23:28Z, 2.0 d before the head run, ref_ms 58.62
  • weighting: raw (class-matched capture; load_factor 1.04×; no calibration-scaling entry)
  • attribution: no measured master improvement between capture master a914699df and merge base cbf53e4fb (39 commits)

thresholds: regress ≥ 10%, improve ≥ 5%

voxel cull effectiveness

cell ratio (base→head) avg visible total avg feeder
target=IRLuaPerfGrid,zoom=1,sub_mode=full,sub_base=1 1.000 → 1.000 (+0.0pp) 262144 → 262144 1024 → 1024 0 → 0
target=IRLuaPerfGrid,zoom=4,sub_mode=full,sub_base=1 0.598 → 0.598 (+0.0pp) 156630 → 156637 1024 → 1024 0 → 0
target=IRPerfGrid,zoom=1,sub_mode=full,sub_base=1 1.000 → 1.000 (+0.0pp) 262144 → 262144 1024 → 1024 0 → 0
target=IRPerfGrid,zoom=4,sub_mode=full,sub_base=1 0.975 → 0.975 (+0.0pp) 255592 → 255592 1024 → 1024 0 → 0

frame timing (ms)

cell avg p99
target=IRLuaPerfGrid,zoom=1,sub_mode=full,sub_base=1 334.67 → 338.84 (+1.2%) 1009.08 → 1012.61 (+0.3%)
target=IRLuaPerfGrid,zoom=4,sub_mode=full,sub_base=1 729.45 → 738.73 (+1.3%) 1402.16 → 1439.33 (+2.7%)
target=IRPerfGrid,zoom=1,sub_mode=full,sub_base=1 419.20 → 444.58 (+6.1%) 6041.55 → 6967.87 (+15.3%) ⚠
target=IRPerfGrid,zoom=4,sub_mode=full,sub_base=1 1038.93 → 1076.82 (+3.6%) 1750.45 → 1759.13 (+0.5%)

GPU frame timing (ms; separate from stage samples)

cell envelope (base→head) buffer spans (base→head) coverage (base→head)
target=IRLuaPerfGrid,zoom=1,sub_mode=full,sub_base=1 unavailable → unavailable unavailable → unavailable unavailable → unavailable
target=IRLuaPerfGrid,zoom=4,sub_mode=full,sub_base=1 unavailable → unavailable unavailable → unavailable unavailable → unavailable
target=IRPerfGrid,zoom=1,sub_mode=full,sub_base=1 unavailable → unavailable unavailable → unavailable unavailable → unavailable
target=IRPerfGrid,zoom=4,sub_mode=full,sub_base=1 unavailable → unavailable unavailable → unavailable unavailable → unavailable

GPU stage timing (avg ms per sampled invocation)

cell canvasClear voxelCompact voxelStage1 voxelCardinalElect voxelStage2 voxelSunFaces textToTrixel buildLightOcclusionGrid computeVoxelAO bakeSunShadowMap computeSunShadow computeLightVolume lightingToTrixel fogToTrixel trixelToFb resolvePerAxisScreenDepth fbToScreen cardinalSurfaceFb
target=IRLuaPerfGrid,zoom=1,sub_mode=full,sub_base=1 12.94→13.14 38.31→39.78 34.21→35.49 0.60→0.62 33.78→32.35 57.75→58.78 — 0.00→0.00 2.26→2.45 17.55→8.19 ↓ 12.59→0.32 ↓ 11.85→23.88 ⚠ 2.49→1.08 ↓ 0.88→0.89 0.15→0.13 ↓ — 5.09→5.31 0.00→0.21
target=IRLuaPerfGrid,zoom=4,sub_mode=full,sub_base=1 13.45→13.84 174.93→178.97 146.62→149.58 2.26→2.47 134.13→131.47 92.68→95.51 — 0.00→0.00 1.90→5.86 ⚠ 29.40→7.46 ↓ 11.32→0.30 ↓ 10.19→21.92 ⚠ 5.20→1.15 ↓ 0.91→0.94 0.11→0.12 — 4.83→5.15 0.00→0.25
target=IRPerfGrid,zoom=1,sub_mode=full,sub_base=1 12.20→12.33 44.70→46.42 38.16→38.07 5.47→6.61 ⚠ 30.70→31.01 53.92→54.02 0.73→0.77 0.00→0.00 4.61→4.32 ↓ 37.98→33.31 ↓ 11.95→0.51 ↓ 25.69→39.22 ⚠ 4.14→3.99 1.17→1.25 0.11→0.12 0.00→0.00 5.66→6.21 0.00→0.33
target=IRPerfGrid,zoom=4,sub_mode=full,sub_base=1 12.62→12.75 279.88→287.34 236.71→255.20 3.66→3.78 209.06→210.06 98.13→100.72 0.72→0.74 0.00→0.00 2.06→4.76 ⚠ 39.22→7.64 ↓ 11.50→0.32 ↓ 10.62→22.52 ⚠ 4.42→1.20 ↓ 0.98→1.03 0.11→0.13 ⚠ 0.00→0.00 4.71→5.24 ⚠ 0.00→0.64

top CPU systems by avg ms (head)

target=IRLuaPerfGrid,zoom=1,sub_mode=full,sub_base=1

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%)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fleet:approved Fleet reviewer approved — ready for human merge fleet:author-claude Implementation last authored by Claude; route review to Codex fleet:authored-on-macos PR was authored and smoke-tested on macOS Metal backend fleet:verified-windows Cross-host smoke passed on windows-debug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

lighting: fog-pass pipelines take the one sun-shadow receiver model by default (stage 2 of #4965)

1 participant