# Soft sun shadows: the GI carries the wide penumbra, a hard core plus a short blur carries the crisp part (2026-10-26) Status: **KILLED at screening** (offline model only, no renderer code, no GPU). Branch `shadow-gi` off main @c1ff1446. It follows `shadow-practice/docs/soft-shadow-practice.md` (P1/P2), and reuses the harnesses and metrics of `shadow-blur/docs/soft-shadow-blur.md` (floor sets) and `shadow-temporal/docs/soft-shadow-temporal.md` (perspective events), so the numbers compare with theirs. The owner's question: *"can something like GI + hard shadows with fixed blur reduced by proximity (1) get us a coarse approximation of wider penumbras?"* Scratch, model and images are in `logs/shadow-gi/` on nazrin: - the model: `logs/shadow-gi/model/`: - `p2.ts`: hard ray + P2; - `cells.ts`: GI-like world cells, the bent ray, reconstruction; - `fjob.ts`: floor sets; - `ev.ts`: events; - `aggfloor.py`, `aggev.py`, `evsum.py`: tables; - `fsheet.ts`, `esheet.ts`, `gen_sheets.sh`: sheets. - results: `full/` (floor sets; `agg-zoom.md`, `agg-fit.md`) and `events/`. - the owner's sheets: `logs/shadow-gi/owner/` (§7). Evidence tags as before: **[M]** measured in the model this round, **[V]** measured by an earlier round, **[C]** read in the code or docs (file:line), **[I]** inference. ## 0. Summary - **How the sun reaches GI today** (§1). GI caches *indirect* irradiance per world-space proxy cell. Direct sun enters GI only at the hit point of each GI ray, through one hard ray toward the snapped sun centre. Nothing samples the sun disk, the sky has no disk, and only body 0 is traced. - **The cells are coarse.** The smallest snap whose tile spans ≥ 8 pixels is used, in steps of 4×: tiles of 4, 16, 64 and 256 voxels. At 800×600 that is 4 v out to ~210 v from the camera, 16 v out to ~860 v, and 64 v beyond. A cell commits a 128-sample cycle at a time, and its history runs to 256 cycles. - **Formulations** (§2): (a) a w-blend of hard and the cell's disk visibility; (b) P2 plus a cell residual (disk minus centre); (d) P2 plus a "beyond-the-cap" residual, from a bent ray, which cannot double-count what P2 already did; (c)/(e) a κ blend that hands over from P2 to the cell's disk visibility as the penumbra grows wider than the cell. - **The structural limit.** A blur conserves occlusion. So the cell mean of (soft − hard), or of (soft − capped), is close to zero wherever the cell is wider than the penumbra. The GI can only carry a penumbra that spans about two cells or more: at 4° that is a blocker over ~115 v away (4-v cells) or ~460 v away (16-v cells). Most casters in a voxel scene sit below that, in the gap between P2's cap and the cell size. - **Floor sets, steady state** (§3). Mean |err| at 4° / 8°, zoom view, at production-size cells (16 v at 1 v/px): | | 4° | 8° | |---|---|---| | hard | 0.241 | 0.233 | | P2 cap 4 | 0.103 | 0.129 | | best split (e4) | 0.045 | 0.039 | | earlier rounds' steady: blur sg2 · temporal | 0.025 · 0.011 | 0.022 · 0.010 | | BC | 0.005 | 0.005 | - The best split keeps 33-37 of 62 sets with seams and 33-43 rough. That is the visible **two-step look**: a crisp P2 core inside a smooth cell halo, with a corner where κ hands over. - It also shows **cell leaks**: the box-on-floor and stacked-plate shadows spread a cell's width across contact. - At 0.53° the GI adds nothing; P2 alone is best. - **Perspective scenes and events** (§4). - At 4° the split gains 0-0.02 over P2 in every scene (most penumbrae fit within cap 2 there, or are narrower than a cell). - At 8° it gains 0.02-0.09. The windmill improves from 0.20 to 0.12, against the temporal round's ~0.02 at rest. - **Temporal behaviour is not the problem.** The GI part is a small, smooth correction, so its lag is small too. A dedicated fast channel stays within 0.05-0.10 of the no-lag oracle through the cut, the turn and both moving casters. The hard core keeps moving shadows honest. - **The production estimator shape pops.** It shows nothing until a cell's first 128-sample cycle commits (16 frames), then jumps by up to 0.25-0.36: a visible mode shift. The split would need its own fast channel, not the GI's estimator. - **Cost** (§5) [I]. Each sample is 3-3.3 sun-ray legs (disk, centre, bent) from a cell footprint, at the full 2 000-voxel reach plus the entity BVH. Prices are ±2-3×: | channel | per sun | N = 8 | |---|---|---| | fast (8 samples per cell per frame) | 0.4-2.0 ms | 3-16 ms | | production-shaped, settled | 0.03-0.4 ms | 0.3-3 ms | | production-shaped, peak in a pan | 1-6 ms | — | Add P2 (0.02-0.5 ms per sun), plus restoring a per-pixel blocker distance, which main no longer stores. - **Verdict: kill** (§6). - The look fails the bar at 4-8°: the two-step, cell leaks, and thin far casters that stay crisp where they should dissolve. It is 4-8× worse than the killed blur and temporal rounds' steady values. - It does not fit N = 8 with a channel fast enough to avoid the pop. - At 0.53° it adds nothing. - What the model does say is that P2 alone, at cap 4, halves hard's error at 4-8° (0.24 → 0.10-0.13). That remains the screening path. ## 1. How the surface GI works today, as it bears on this [C] Abbreviations: - UP = `client/src/renderer/surface-gi-update-pass.ts` - CACHE = `client/src/renderer/surface-gi-cache.ts` - LW = `client/src/renderer/lighting-worklist-pass.ts` - SGW = `docs/surface-gi-workstream.md` - WS = `WORKSTREAM-coarse-first-gi.md` - AMD = `docs/gi-cost-amd.md` - CL = `docs/celestial-lighting.md` **Cells.** - A proxy cell is a persistent, hashed, world-space surface-cache entry, keyed by (part, snap, 6-way normal class, tangent-snapped coordinate, patch) (SGW:296-309, 459-465). The normal-axis coordinate stays exact. - A record at snap s stands for a 4^s-voxel block (SGW:411-412), so tiles are 4 / 16 / 64 / 256 voxels. - The snap is "the smallest snap whose cell spans the target pixels": - `ceil(0.5·log2(8·d·pixelAngle))`, clamped to [1, 4] (UP:5751-5757, UP:1215; CACHE:995-999; `SURFACE_GI_PROXY_TARGET_CELL_PIXELS = 8`, CACHE:346). - A half-level smoothstep blends toward the next size (CACHE:347, 1003-1013). - So a tile spans 8-32 pixels. At 800×600: 4 v to ~210 v from the camera, 16 v to ~860 v (SGW:397-398; WS:944-946). - Footprint rays start on the tile's face, at R2-spread points, skipping starts in solid (SGW:406-415). - Reconstruction at a receiver is a 4-tap tangent-plane bilinear within the normal class, with a ±4-voxel depth search and cover-weighted taps (LW:1347-1356; CACHE:988-993). - The table holds 2^19 slots (CACHE:334-342). About 5 k identities are live and ~4.1 k are updated a frame on the AMD route (AMD:55-61). **How the sun gets in.** - A GI sample's contribution is computed at the GI ray's *hit*, as emission + direct sun + albedo × the hit cell's previous irradiance (UP:7893-7923). - Direct sun at the hit is one hard ray along `sunShadowDir()`, 2 000-voxel reach, times the entity-BVH ray, with the global large-sun cutoff strength (UP:2670-2717). - **No GI ray samples the sun disk.** Cell rays follow a 128-ray cosine-hemisphere cycle (`surface-gi-sampling.ts:1-15`). - A miss returns `skyAmbient(rd)`, a gradient with no disk (UP:7907-7909). - Emitter NEE exists: every 4th sample goes toward a learned emitter box, MIS-weighted (WS:2008-2034). It is a precedent for a "light ray" in the sample loop. - Only `lights[0]` is used. Multi-body GI is design only (CL:1893-1899, 1967-1992). - **So the cached value is indirect only.** A sun-disk visibility term would be a new quantity per cell per sun. It would not be a by-product of anything the GI already computes. Nor would it double-count the bounce, because GI never adds direct sun at its own cell. **Ray budget and amortisation.** - The budget is 131 072 rays a frame (High / default), 65 536 Medium and 32 768 Low (UP:82-85, 1754-1772). - A cell takes at most 8 rays a frame (UP:1316). - Young cells (< 16 cycles) get the fair share. Settled cells get 1-3 rays on period frames, with periods of 1-16 by coverage (UP:11429-11576). - Measured on the AMD route: ~19.4 k warm rays and ~20.4 k samples a frame, each a GI ray + a sun ray + the entity-BVH ray + a bounce lookup. - The warm passes cost 0.577 ms. GI totals 1.550 mean / 2.102 p95 ms (AMD:55-63, 96-100). - Settled scenes run 3.3-7.5 k rays; a 0.5 rad/s pan peaks at 110-125 k (WS:542-544). **Temporal.** - A cycle is 128 samples, committed whole (CACHE:359-361). - The blend is `mix(base, cycleMean, 1/(kept+1))`, with up to 256 cycles of history, capped at a fraction of the cell's age. It re-anchors past z = 3.5 (UP:8681, 8808-8845). - Error after a reset: 1.5 / 1.0 / 0.5 / 0.3 % of irradiance at 0.5 / 1 / 2 / 4 s (WS:538). - Moved-occluder ghosts last ~1-10 s at 0.2-1.3 % mean (WS:514-521, 540). That is fine for indirect light, at a few percent of the frame's radiance. A direct shadow edge is a 100 % contrast. - Moving suns cap history by `clamp(2·lag/(turn·16), 4, 256)` cycles (`celestial-lights.ts:117-142`). A jump resets GI (CL:1508-1511). - Moving parts (`PART_FLAG_MOVING`) blend each batch as a ~32-sample EMA (UP:8562-8576). **Entities.** - As casters, GI rays hit entities, and the hit's sun ray includes the entity BVH (UP:2701-2706). - As receivers, entity cells are keyed in the entity's own frame (SGW:462; WS:1758-1786). - There is no entity/terrain rule in the estimator (WS:1176-1178). The split would be parity-clean. It would lag the same for a moving NPC and for a terrain edit. **The direct path on main.** - One hard ray per VSC slot toward `sunShadowDir()` (`voxel-shadow-refresh-pass.ts:206-223`) stores **T only**. - **There is no blocker distance any more**: the edge field's bit was freed on 2026-10-26 (CL:317-326, 508-528). P2 needs it back. - Entity casters are traced inline in lighting (LW:2457-2479). - Only body 0 is shadowed: multi-body shadows are Stage 5b design (CL:1893-1926). - The large-sun cutoff fades 8° → 10° (`common/src/celestial.ts:325-350`). ## 2. The formulations [M] Per pixel, from main's hard ray: - **T**, the hard visibility; - **d**, the blocker distance; - **P2_c**, P2 at light-space radius cap c. It is the shadow-blur round's height-rule gather, with r = clamp(d·tanR, r_min, c), plane-tested. On lit pixels, d comes from the nearest shadowed neighbour that reaches them. This is an *idealised* P2 (exact gather, no tap budget, no guard band beyond c). Per GI cell (tile s, world-keyed; entity-local on moving parts), area means over its real surface: - **Vd**: sun-disk visibility; - **H**: hard (centre-ray) visibility; - **R = Vd − H**: one disk ray and one centre ray from the same footprint point; - **Rb_c = Vd − V_bent,c**, where the **bent ray** follows the disk direction until its offset from the centre ray reaches c voxels, then runs parallel to L. A blocker at depth t is tested at offset min(t·tanR, c). This is exactly what P2's capped filter converges to for a planar blocker, so Rb_c is "what lies beyond the cap". It costs one more ray leg. Each cell quantity Q is reconstructed by bilinear, cover-weighted, same-plane taps (Q̃), as the GI does. κ = min(1, s / w_pen), where w_pen = 2·d·tanR / (N·L) is the penumbra width on the receiver. | name | direct visibility | idea | |---|---|---| | a50 | 0.5·T + 0.5·Ṽd | brief (a), w = 0.5 | | gi | Ṽd | GI alone (a with w = 0) | | b_c | P2_c + R̃ | brief (b): the residual over hard | | d_c | P2_c + R̃b_c | (b) without double counting: only the part beyond the cap | | c_c | Ṽd + κ·(P2_c − H̃) | (c): the high-frequency P2 detail fades out where the penumbra is wider than a cell | | **e_c** | κ·(P2_c + R̃b_c) + (1 − κ)·Ṽd | (c) built on d: the best overall | **What each one gets wrong, by construction:** - **(a)** halves every umbra at contact and keeps a hard edge at half contrast: a two-step by definition. - **(b)** double-counts. Inside cap distance P2 has already softened the edge, and R adds the same softening again at cell scale. It shows as a bright smear into umbrae (`owner/cut-ledge-8.png`, the b-or rows in `logs/shadow-gi/evt`). - **(d)** removes the double count. But a blur conserves occlusion, so the tile mean of Rb is near zero unless the beyond-cap penumbra spans about two tiles. d ends up close to P2 almost everywhere. - **(c)/(e)** trade the P2 detail for the cell's disk visibility where the penumbra is wide. That fixes the wide-penumbra floor sets, at the price of: - a visible hand-over (the κ corner); - cell-scale leaks wherever a tile straddles an umbra edge or contact, since Ṽd is a 16-64-voxel average. ## 3. Floor sets, steady state [M] These are the screen round's 14 cases × 5 elevations × 3 sizes; 185 sets are in reach. The views: - **zoom**: 1 voxel = 1 px, so production cells are 16 v. The 4-v column is what the camera's own neighbourhood gets (< ~210 v at 800×600). - **fit**: 1-8 voxels a pixel, cells by the production formula (16-64 v). `_q` is a hypothetical 4× finer cell. Each cell is mean |err| · spike sets · seam sets · rough sets (out of 59-62), with the **signed** mean error in brackets (+ = too bright). The reference is the screen round's 1 024-ray image. Steady values are the exact cell means (64-128 disk rays at 16-64 points a tile), i.e. a converged GI. Full tables: `logs/shadow-gi/full/agg-{zoom,fit}.md`. **Zoom view (1 v = 1 px):** | estimator | 0.53° | 4° | 8° | |---|---|---|---| | hard | 0.232 · 27 · 51 · 28 (−0.036) | 0.241 · 47 · 58 · 53 (+0.009) | 0.233 · 45 · 56 · 55 (+0.018) | | BC N = 256 | 0.004 · 0 · 0 · 0 | 0.005 · 0 · 0 · 1 | 0.005 · 0 · 1 · 0 | | P2 cap 2 | 0.084 · 1 · 6 · 15 (−0.018) | 0.139 · 17 · 42 · 50 (+0.009) | 0.159 · 16 · 52 · 55 (+0.018) | | **P2 cap 4** | **0.067 · 1 · 0 · 5** (−0.019) | 0.103 · 3 · 20 · 36 (+0.009) | 0.129 · 0 · 33 · 48 (+0.018) | | *cells 16 v (production at 1 v/px):* | | | | | gi | 0.175 · 37 · 26 · 19 | 0.076 · 16 · 12 · 23 | 0.051 · 13 · 6 · 21 | | a50 | 0.110 · 35 · 31 · 30 | 0.098 · 34 · 54 · 53 | 0.102 · 36 · 56 · 54 | | b2 | 0.074 · 3 · 5 · 17 (−0.003) | 0.080 · 20 · 41 · 48 (+0.000) | 0.078 · 17 · 52 · 54 (−0.003) | | c2 | 0.073 · 4 · 6 · 15 (+0.003) | 0.066 · 19 · 39 · 45 (+0.014) | 0.057 · 21 · 49 · 49 (+0.014) | | d4 | 0.067 · 1 · 0 · 5 (−0.019) | 0.057 · 3 · 19 · 36 (−0.008) | 0.058 · 0 · 31 · 47 (−0.007) | | **e4** | 0.073 · 2 · 9 · 7 (−0.012) | **0.045 · 6 · 33 · 33** (+0.005) | **0.039 · 9 · 37 · 43** (+0.008) | | *cells 4 v (near the camera):* | | | | | gi | 0.129 · 34 · 40 · 8 | 0.041 · 13 · 15 · 13 | 0.023 · 12 · 10 · 6 | | b2 | 0.064 · 1 · 9 · 22 | 0.039 · 9 · 42 · 48 | 0.032 · 10 · 49 · 52 | | c2 | 0.057 · 7 · 2 · 5 | 0.025 · 9 · 19 · 20 | 0.018 · 15 · 28 · 23 | | d4 | 0.066 · 1 · 0 · 5 | 0.043 · 3 · 9 · 36 | 0.037 · 0 · 24 · 48 | | e4 | 0.073 · 7 · 1 · 6 | 0.027 · 7 · 20 · 17 | 0.017 · 6 · 29 · 20 | **Fit view (far; production cells 16-64 v):** | estimator | 0.53° | 4° | 8° | |---|---|---|---| | hard | 0.227 · 26 · 46 · 16 | 0.228 · 59 · 60 · 57 | 0.203 · 62 · 61 · 60 | | BC N = 256 | 0.004 · 0 · 0 · 0 | 0.005 · 0 · 0 · 0 | 0.005 · 0 · 0 · 0 | | P2 cap 4 | 0.088 · 7 · 6 · 8 | 0.114 · 31 · 39 · 48 | 0.123 · 38 · 47 · 55 | | gi | 0.192 · 58 · 32 · 17 | 0.102 · 27 · 21 · 44 | 0.069 · 21 · 14 · 40 | | d4 | 0.087 · 7 · 6 · 8 | 0.088 · 32 · 38 · 48 | 0.086 · 37 · 48 · 55 | | **e4** | 0.088 · 7 · 6 · 8 | **0.073 · 22 · 35 · 46** | **0.060 · 22 · 40 · 55** | | e4_q (cells 4× finer, hypothetical) | 0.090 · 10 · 5 · 8 | 0.039 · 19 · 23 · 34 | 0.024 · 16 · 29 · 34 | For scale, the earlier rounds' steady values on these sets: - the shadow-blur round's sg2: 0.025 / 0.022 zoom and 0.034 / 0.022 fit [V]; - the temporal round's steady state: 0.011 / 0.010 zoom [V]. **Reading:** - **The split does what the owner hoped only where the cells are fine enough.** - With 4-v cells (near the camera) e4 / c2 reach 0.017-0.027 mean. That is the blur round's level, but with 17-29 seam sets and 6-15 spike sets against its 2-4. - At the production cell size for 1 v/px (16 v), the best is 0.045 / 0.039. Far away (16-64 v) it is 0.073 / 0.060, against P2's 0.11-0.12. - **The two-step look is measured.** Seam sets stay at 33-40 / 62 for every split at production cells, almost as many as P2 alone (20-47). Rough sets are 33-55. In `owner/steady-zoom-s16-8.png`: - plate_10 and louver_10 show a crisp P2 block in the shadow's corner, inside a smooth cell halo; - high_20 and cross_20 keep the 1-voxel rails crisp, 100-140 voxels over the floor. The reference has dissolved them to a faint smear. This is the "exaggerated small sun" look the owner wants gone, and the split keeps it wherever κ = 1. - **Cell leaks.** - gi and c at 16 v spread the box-on-floor shadow a cell's width across the contact (boxcube_45: a blue band of up to 0.25 around the box). - c2 brightens the slats_45 umbra (red, +0.2): the cell's H̃ and Ṽd average the stripe pattern, and κ hands the stripes over to the average. - **No double count in d/e.** The signed errors are within ±0.02, and the bent ray keeps contact at P2's quality (d4's spike sets equal P2's). - **0.53°:** no split beats P2 cap 4 (0.067 zoom, 0.088 fit). The GI terms are near zero (a 0.53° penumbra is under one cell), and the κ forms only add cell noise. ## 4. Perspective scenes and events [M] These are the temporal round's scenes and cameras (200×150, 50-60° fov), with its saved 1 024-ray references. Metrics are taken at its save frames. Cells by the production formula with its blend, so at this resolution most cells are 16 v. P2 is cap 2. Three cell schedules: - **or**: oracle, exact cell means each frame (a converged GI that never lags); - **fast**: a dedicated sun channel. 8 disk + centre + bent sample sets per listed cell per frame, a running mean capped at 96 samples (12 frames), shrunk toward 0 by n/(n+16) while young; - **prod**: the production estimator's shape. 128-sample cycles committed whole; 8 rays a frame while young and 2 when settled; `mix(base, cycle, 1/(kept+1))` up to 256 cycles; re-anchor at z > 3.5. Full rows: `logs/shadow-gi/events/rows.jsonl`; tables from `model/evsum.py`. **Cold start (camera cut).** Mean |err| at frames 1 / 3 / 12 / 24: | scene | size | hard | P2 | e-or | e-fast | e-prod | |---|---|---|---|---|---|---| | yard | 4° | 0.240 | 0.064 | 0.064 | 0.055 / 0.061 / 0.063 / 0.064 | 0.064 | | wall | 4° | 0.238 | 0.029 | 0.029 | 0.029 | 0.029 | | ledge | 4° | 0.225 | 0.108 | 0.103 | 0.072 / 0.080 / 0.097 / 0.103 | 0.108 → 0.106 | | stacked | 4° | 0.236 | 0.076 | 0.076 | 0.073 / 0.075 / 0.076 / 0.076 | 0.076 → 0.075 | | yard | 8° | 0.249 | 0.117 | 0.100 | 0.100 / 0.094 / 0.094 / 0.100 | 0.117 until f16, then 0.102 | | wall | 8° | 0.239 | 0.085 | 0.081 | 0.073 / 0.068 / 0.084 / 0.082 | 0.085 until f16, then 0.074 | | ledge | 8° | 0.227 | 0.172 | 0.083 | 0.091 / 0.076 / 0.083 / 0.083 | 0.172 until f16, then 0.084 | | stacked | 8° | 0.241 | 0.147 | 0.084 | 0.089 / 0.083 / 0.082 / 0.080 | 0.147 until f16, then 0.082 | | all four | 0.53° | 0.19-0.24 | 0.10-0.14 | = P2 | = P2 | = P2 | For scale, the temporal round at 4° / 8° [V]: 0.06-0.11 at f1, 0.022-0.038 at f3 and 0.007-0.021 at steady state. - **Frame 1 is plausible.** With no history, the residual shrinks to zero and the image is P2. The fast channel reaches its converged value in about 3-12 frames, within the bar. - **The prod shape shows P2 for 16 frames, then jumps** (ledge 8°: 0.172 → 0.084, a per-pixel change of up to 0.36; stacked up to 0.25). That is a pop on every newly seen cell: a mode shift by the owner's rule. - At 4° the converged split (e-or) gains at most 0.005 over P2. The cut scenes' penumbrae are either within cap 2 or narrower than a 16-v cell. **Moving casters and moving camera.** Mean |err|: - npc and windmill: frames move f12 / move f48 / stop +1 / stop +4 / stop +12; - turn: turn f24 / f36 / after +1 / +4 / +12; - pan: f1 / f12 / f64; - walk: f1 / f12 / f48. | event | size | P2 | e-or | e-fast | e-prod | |---|---|---|---|---|---| | npc | 4° | 0.034-0.035 | = P2 | = P2 | = P2 | | npc | 8° | 0.095 / 0.095 / 0.094 / 0.094 / 0.094 | 0.090 / 0.089 / 0.088 / 0.088 / 0.088 | 0.089 / 0.088 / 0.089 / 0.089 / 0.082 | 0.088 / 0.090 / 0.089 / 0.089 / 0.089 | | windmill | 4° | 0.201 / 0.195 / 0.195 / 0.195 / 0.195 | 0.186 (all) | 0.172 / 0.179 / 0.177 / 0.172 / 0.184 | 0.175 / 0.183 / 0.183 / 0.183 / 0.182 | | windmill | 8° | 0.203 / 0.201 / 0.200 / 0.200 / 0.200 | 0.124 / 0.117 / 0.117 / 0.117 / 0.117 | 0.125 / 0.115 / 0.115 / 0.116 / 0.123 | 0.127 / 0.127 / 0.127 / 0.127 / 0.122 | | turn | 8° | 0.067 / 0.107 / 0.117 / 0.117 / 0.117 | 0.065 / 0.097 / 0.100 / 0.100 / 0.100 | 0.064 / 0.086 / 0.089 / 0.087 / 0.089 | 0.067 / 0.105 / 0.114 / 0.114 / 0.098 | | pan | 8° | 0.068 / 0.068 / 0.083 | 0.066 / 0.067 / 0.081 | 0.067 / 0.062 / 0.081 | 0.066 / 0.067 / 0.080 | | walk | 8° | 0.101 / 0.106 / 0.138 | 0.072 / 0.068 / 0.088 | 0.079 / 0.067 / 0.096 | 0.074 / 0.066 / 0.085 | | sun (6 h day) / sunfast (2 min day) | 8° | 0.117 / 0.115-0.117 | 0.100 / 0.099 | 0.088-0.100 / 0.090-0.100 | 0.100 / 0.100 | | all | 0.53° | = P2 | = P2 | = P2 | = P2 | **Ghosting: the lagging estimators against the no-lag oracle.** Each cell is px > 0.05 / max |Δ|, over the 200×150 image. | event (8°) | fast | prod | |---|---|---| | windmill, move f1-f12 | 0 / ≤ 0.04 | ≤ 501 / 0.12 (cells still on their first cycle) | | windmill, stop +1 … +12 | ≤ 10 / 0.05 | ≤ 15 / 0.05 | | npc, stop +1 … +12 | 0 / ≤ 0.02 | 23-42 / 0.08 | | turn, after +1 … +4 | 13-151 / 0.05-0.07 | 257 / 0.30 | | cut-ledge f1-f12 | 33-409 / 0.06-0.10 | 1 194 / 0.36 | | cut-stacked f1-f12 | 0-736 / 0.04-0.10 | 3 002 / 0.25 | **Reading the events:** - **The owner's hope about motion holds.** The hard core moves with the caster every frame. The GI's wide part is a smooth correction of at most ~0.1, so even a lagging estimate stays within 0.05 of the oracle on a moving NPC or windmill. A lagging wide halo would be acceptable. - **The moving-caster ghost the temporal round failed on (0.46-0.63 trails) does not appear.** But that is because the wide part is small. The windmill at 8° is still at 0.12 against the temporal round's ~0.02 at rest: the halo the owner wanted is mostly missing, not lagging (`owner/windmill-8.png`: the blades stay crisp lines where the reference has dissolved them). - **No snap when things stop or start.** The stop columns match the move columns, and nothing in the split switches on motion. - The one mode shift is the production estimator's first-cycle pop on new cells (cut, turn) of up to 0.25-0.36. - The fast channel shows none: by frame 3 it is within 0.04-0.10 of the oracle. - **Moving sun:** the residual follows the real sun speeds and the 2-minute day with no lag above noise. The sun-sweep issue lives in the hard core, not here. ## 5. Cost [I] **Prices.** These are bracketed from measured passes, ±2-3×. - **A coherent hard sun ray** on the VSC refresh costs about 2 ns, including the install: 218 k new installs a frame cost 0.42 ms during a turn (CL:1750-1775). - **A GI warm sample** (GI ray + hit sun ray + entity BVH + lookup) costs about 28 ns: 0.577 ms / 20.4 k samples (AMD:55-63, 96-100). - **A sun-ray leg from a cell footprint** (full reach + entity BVH, thread-per-cell serial chains) is taken as **3-15 ns**. **One sample per sun** is the disk ray + the centre ray + the bent ray (two legs): **≈ 3.3 legs**, so 10-50 ns. The centre ray could reuse the cell's own hard value only where the cell is uniformly lit or dark. **Volume.** In the model, 330-800 cells are listed at 200×150. Scaled ×16 to 800×600, that is ~5-13 k, matching production's ~5 k identities. | schedule | samples / frame / sun | per sun | N = 8 | basis | |---|---|---|---|---| | fast (8 per listed cell) | ~40 k | **0.4-2.0 ms** | **3-16 ms** | 5 k cells × 8 × 10-50 ns | | production-shaped, settled | 3.3-7.5 k (the GI's own settled rate) | 0.03-0.4 ms | 0.3-3 ms | WS:542-544 | | production-shaped, pan peak | 110-125 k | 1.1-6 ms | 9-50 ms | WS:542-544 | **Plus, per sun:** - **P2:** 0.02-0.1 ms at cap 2 and 0.03-0.5 ms at cap 4 (soft-shadow-practice §6). - **A per-pixel blocker distance** written back into the hard path, which main dropped with the edge field: ~0.01-0.02 ms (soft-shadow-practice §6). - **κ and the reconstruction**, which lighting already does for GI: ≈ 0.02 ms. **Does it fit the GI's amortisation?** - **In steady state, yes.** The production-shaped schedule matches the GI's settled rays, and for N = 1 it fits the 0.7-2.3 ms headroom. - **For freshness, no.** That schedule is what pops at frame 16 (§4). The fast schedule that avoids the pop costs 0.4-2 ms for one sun and 3-16 ms for eight. - **Nothing is shared between suns** except the footprint point and the listing. - **Neither GI nor shading handles N > 1 bodies today** (§1), so both the N = 8 GI terms and the N = 8 hard core are new work. ## 6. Verdict: kill The idea fails on look first, then on cost. 1. **Look.** At the cell sizes the GI actually uses (tiles of 8-32 px, so 4 / 16 / 64 v), the cells cannot carry the penumbrae of most casters. - A blur conserves occlusion, so the tile mean of any residual is about zero until the penumbra spans about two tiles. - That needs a blocker ≥ 115 v away at 4° with 4-v tiles, or ≥ 460 v with 16-v tiles. It needs about half that at 8°. - In between lies a gap that neither P2's cap nor the cells cover, and the result is the two-step look: 33-40 seam sets of 62 at production cell size. - The κ forms that hand the wide part to the cell bring cell-scale leaks at contact and under stripe patterns. - At 4-8° the best split (e4) is 0.045 / 0.039 near the camera and 0.073 / 0.060 far away. That is 2-4× worse than the killed blur round and 4-6× worse than the killed temporal round, with more seams than either. 2. **Temporal.** It is fine with a dedicated fast channel. But the GI's own estimator pops by up to 0.36 when a new cell's first cycle commits. 3. **Cost.** The fast channel costs 0.4-2 ms per sun and 3-16 ms for N = 8, over a 0.7-2.3 ms headroom. 4. **0.53°.** There is no gain over P2. **What survives:** - **P2 at cap 4 alone** halves hard's error at 4-8° (0.24 → 0.10-0.13 zoom, 0.11-0.12 fit) with no history and no new per-sun GI work. Its seams (20-47 sets) are the clamped penumbra's ramp being steeper than the reference's, not artifacts. - **The bent ray** is a clean way to say "the part of the penumbra beyond the cap". If a later round wants to try a wide term from any cache (VSC-resolution, not GI cells), Rb_c on top of P2_c is the right form: - no double count (signed error within ±0.02); - contact identical to P2's. - **The reference point for "a cache fine enough"** is the hypothetical 4×-finer cells: e4_q fit 0.039 / 0.024. That is a dedicated sun cache at ~2-8 px a tile. It is no longer "the GI", and it carries the temporal round's cost profile. ## 7. Decisions for the owner 1. **Accept the kill of "GI carries the wide penumbra"?** - Recommendation: yes. - The numbers: at production cells the best split is 0.045 / 0.039 (4° / 8°) near the camera and 0.073 / 0.060 far away, against P2 cap 4's 0.103 / 0.129 and 0.114 / 0.123. - But 33-40 of 62 sets keep a visible two-step, and a GI sun channel costs 0.4-2 ms per sun to avoid a first-cycle pop of up to 0.36. 2. **Is P2 (cap 4) with a clamped penumbra the 4-8° look?** It is stateless and parity-clean, and frame 1 is final. Thin far casters stay crisp lines where a real 8° sun dissolves them (cross_20, high_20, windmill blades). If that is unacceptable at 8°, the honest levers are: - (a) lower the cutoff (CL:1842-1847 already recommends 6° → 9°); - (b) cap the body's angular size for shadowing below the drawn disk. That is a cheat that matches intuition: "big glowing body, normal shadows". - Neither needs GI. 3. **If a wide term is still wanted later:** screen P2_c + Rb_c from a dedicated cache at ≤ 8 px tiles, not the GI's 8-32 px proxy cells. - Expect the temporal round's cost class (1.3-9 ms per sun [V]). - Do not reuse the GI's 128-sample cycle estimator: it pops. 4. **At 0.53°:** P2 at cap 2-4 only, with no GI term (it adds nothing). The standing-rule checks: - **Parity:** GI treats entities like terrain, as casters (BVH) and as receivers (entity-local cells). The split adds no entity or moving rule. - **Mode shifts:** none in the fast channel. The production estimator shape would add one. - **Gravity axis:** none (light-space ellipses, normal classes). - **Safari/WebGPU:** nothing beyond compute and storage buffers. ## 8. The owner's sheets (`logs/shadow-gi/owner/`) Steady floor sets (columns: estimates, then signed error; red = too bright, blue = too dark, full colour at 0.25): - `steady-zoom-s16-{0.53,4,8}.png`: reference, hard, P2 c2, P2 c4, gi, c2, e4 and BC, at production cells for 1 v/px (16 v); - `steady-zoom-s4-{…}.png`: the same at 4-v cells (near the camera); - `steady-fit-{…}.png`: far view at production cells, plus the 4× finer hypothetical (`gi_q`, `e4_q`). Event strips (reference row, then each estimator and its signed error; P2, e-or, e-fast, e-prod): - `cut-{ledge,stacked,yard90}-{4,8}.png`: frames 1, 2, 3, 12, 24. The e-prod pop at f16 shows between f12 and f24. - `windmill-{4,8}.png`: move f1, f12, f48 and stop +1, +4, +12. - `windmill-0.53.png` - `npc-{4,8}.png` - `turn-after-{4,8}.png` - `walk-{4,8}.png` - `sunfast-{4,8}.png` ## 9. Limits - **P2 is idealised:** an exact capped gather on visible receivers, with a guard band only as wide as the cap. A real P2 has a tap budget and plane-test and bilinear artifacts, so the split's numbers are, if anything, optimistic. - **The cells are simplified:** - plain tiles with exact plane separation, cover weights and production sizing; - no patch splitting (it would reduce some contact leaks); - no à-trous pooling of young cells (it would widen the leaks); - no 6-class ambient-cube blend. - **Steady cell values** use 64-128 disk rays at 16-64 points a tile. That adds roughly ±0.01 of noise against a fully converged GI. - **Perspective scenes** use 200×150, so cells are 16 v for most of the view. At 800×600 more of the near view would get 4-v cells, which the zoom s4 column bounds (0.017-0.027). - **Costs are bracketed estimates [I]**, not GPU measurements. No GPU run was needed: the look kills the idea before cost does. - **Only body 0 is modelled per event;** N = 8 is a cost multiplication.