Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
348 commits
Select commit Hold shift + click to select a range
2ebdcbc
RC3.3 review fixes: NOTES (misses add no count: 1/P(hit) in open scen…
DennisSmolek Nov 18, 2026
d553d2c
PROGRESS: RC2.2 review fixes
DennisSmolek Nov 18, 2026
fd94fb3
RC2.2 done: lead PROGRESS entry (with the native D25 measurement), TA…
DennisSmolek Nov 19, 2026
14c07d0
DECISIONS 2026-11-19: the radiance cache is a multi-cache GI system b…
DennisSmolek Nov 19, 2026
f3c4238
Merge radiance-cache (RC2.2) into rc3-3: RC3.3's register rows renumb…
DennisSmolek Nov 19, 2026
51e325b
Merge remote-tracking branch 'origin/radiance-cache' into rc3-3
DennisSmolek Nov 19, 2026
221db4e
RC3.3 docs and comments: Capsaicin behaviour, to be fixed under DECIS…
DennisSmolek Nov 19, 2026
c7071da
PROGRESS: radiance-cache (RC2.2, DECISIONS 2026-11-19) merged into rc…
DennisSmolek Nov 19, 2026
a33acea
RC3.3 done: lead PROGRESS entry, TASKS status; RC3.5 row (fix Capsaic…
DennisSmolek Nov 19, 2026
f44e316
RC3.5: fix Capsaicin's world-cache errors (DECISIONS 2026-11-19): unb…
DennisSmolek Nov 19, 2026
8abe4ec
RC4.1 WIP: temporal screen probes (reprojection, off-screen LRU cache…
DennisSmolek Nov 19, 2026
39735ae
RC3.5: corner bypass section in the slab's shade, so a second hit's o…
DennisSmolek Nov 19, 2026
8692047
RC3.5: register D37 (unbiased second bounce) and D38 (bypass routing)…
DennisSmolek Nov 19, 2026
b0ce23e
Move the GI-1.0 research and native Capsaicin tools here from the ddg…
DennisSmolek Nov 19, 2026
c295817
RC3.5: PROGRESS, TASKS (review)
DennisSmolek Nov 19, 2026
949815b
RC4.1: temporal page (still reprojection, guiding chi-square), stabil…
DennisSmolek Nov 19, 2026
f595a90
RC4.1: test timeouts for the constant-sky model; doc snippet line
DennisSmolek Nov 19, 2026
ae85928
RC3.5 review: an indirect value keeps its value and count on a frame …
DennisSmolek Nov 19, 2026
6e7a395
RC3.5 review: low slab for an unlit bypassing second hit; 900-pixel c…
DennisSmolek Nov 19, 2026
8446a2b
RC3.5 review: D37 amended (sparse cells, the step-down, measurements)
DennisSmolek Nov 19, 2026
1505fe5
RC4.1: PROGRESS, NOTES (stability, history bias), TASKS review, stabi…
DennisSmolek Nov 19, 2026
aa09e88
RC4.1 PROGRESS: Intel UHD run, unit tests
DennisSmolek Nov 19, 2026
8ef8db2
RC3.5 review fixes: PROGRESS, NOTES (D17 grazing share on Sponza and …
DennisSmolek Nov 19, 2026
7aa8740
Merge remote-tracking branch 'origin/radiance-cache' into rc3-5
DennisSmolek Nov 19, 2026
d4f72ed
RC3.5 done: lead PROGRESS entry, TASKS status
DennisSmolek Nov 19, 2026
0108d89
Merge origin/radiance-cache (RC3.3, RC3.5) into rc4-1; register D35-D…
DennisSmolek Nov 19, 2026
c8327f8
RC3.4: the sky as a light in the platform's light choice (opt-in bit)…
DennisSmolek Nov 19, 2026
1e9a3bb
RC4.1 review: running mean per cell with counts (D46), fills never hi…
DennisSmolek Nov 19, 2026
d231b3d
RC4.1 review: interpolationJitter setting, noisy-sky gate and occlude…
DennisSmolek Nov 19, 2026
400ff61
RC3.4: world-cache GPU page sections 15-18, the sky as a light (open …
DennisSmolek Nov 19, 2026
0441853
RC4.1 review: nearest-half atlas stores (D48), CPU reprojection port …
DennisSmolek Nov 19, 2026
c11d066
RC4.1 review: register D44/D46-D48, NOTES (stability, bias), PROGRESS…
DennisSmolek Nov 19, 2026
6647c1b
RC4.1 review: unit tests for the scene-change boxes
DennisSmolek Nov 19, 2026
29d504e
RC3.4: world-cache page header for sections 15-18; scenes page runs B…
DennisSmolek Nov 19, 2026
b687c7e
RC4.1 review: radiance-cache-scenes compares the mean irradiance (gui…
DennisSmolek Nov 19, 2026
7c80225
RC4.1 done: lead PROGRESS entry, TASKS status; RC4.4 row (temporal fo…
DennisSmolek Nov 19, 2026
30ed386
RC3.4: scenes page counts the frame's sky draws
DennisSmolek Nov 19, 2026
8a63de4
RC3.4 to review: register D33 closed and D39, NOTES (Capsaicin's envi…
DennisSmolek Nov 19, 2026
a64b300
Merge origin/radiance-cache (RC4.1, register D40-D48) into rc3-4; RC3…
DennisSmolek Nov 19, 2026
ab6a2b4
RC4.2: FilterScreenProbes, platform SSGI (gi/ssgi), FrameScreen.light…
DennisSmolek Nov 19, 2026
758a9ed
P6.1: SHaRC-style hash cache (from pmndrs/pathtracer) as a second wor…
DennisSmolek Nov 19, 2026
59ea86e
RC3.4 follow-up: a hit with no light to draw counts as a sample of no…
DennisSmolek Nov 19, 2026
ca013cb
P6.2: lever L1, world-cache cells lit on a budget (cellShading 'budge…
DennisSmolek Nov 19, 2026
5b55851
RC4.3: GI-1.0 image-space denoiser after InterpolateScreenProbes, fro…
DennisSmolek Nov 19, 2026
a2aaf8d
P6.1: GPU pages for the SHaRC backend (analytic A/B and NaN scan, tim…
DennisSmolek Nov 19, 2026
4fa2f3d
P6.2: GPU pages radiance-cache-cell-shading (lit plane, queue, furnac…
DennisSmolek Nov 19, 2026
6cf23f1
P6.1: register rows D49-D54, design note; refused inserts judged as a…
DennisSmolek Nov 19, 2026
50aaf1b
RC4.2: near-field page, CPU filter port and tests, stability variants…
DennisSmolek Nov 19, 2026
babaf63
World-cache page section 18 records the second bounce's landing reads…
DennisSmolek Nov 19, 2026
a9fcffb
P6.2: no light, no sample (as per hit) with a dark count; changed cel…
DennisSmolek Nov 19, 2026
38accc8
P6.2: 4 x 64 priority bins in the per-ray lists (the boundary bin's c…
DennisSmolek Nov 19, 2026
a01f3d4
RC4.3 to review: PROGRESS, register D49-D50, NOTES (denoised stabilit…
DennisSmolek Nov 19, 2026
5ac57a9
RC4.2: SSGI samples at texel centres (D56), slices relative to the op…
DennisSmolek Nov 19, 2026
bcf4822
P6.2: scene changes remembered for 16 frames, so cells hit now and th…
DennisSmolek Nov 19, 2026
2dc651f
RC4.3 PROGRESS: denoiser checks pass on Intel UHD too
DennisSmolek Nov 19, 2026
7c86e92
P6.2: cell-shading page starts past the change window
DennisSmolek Nov 19, 2026
01c67aa
P6.1: updateFraction (whole probes update at random, default a quarte…
DennisSmolek Nov 19, 2026
5775fcc
TASKS: RC4.5, toggles for every temporal change and a viewer panel to…
DennisSmolek Nov 19, 2026
d4ab777
RC4.3: denoiserHistoryClamp and denoiserChangeReset settings (scene c…
DennisSmolek Nov 19, 2026
25a95bb
P6.2: claims appended once per workgroup; PrioritizeCells a workgroup…
DennisSmolek Nov 19, 2026
7ef8b30
RC4.2: SSGI samples on the texel's plane along their own ray (D56), s…
DennisSmolek Nov 19, 2026
2566057
P6.1: A/B results (PROGRESS), NOTES, TASKS row P6.1 (review), registe…
DennisSmolek Nov 19, 2026
d556b47
P6.1: experiment rows renumbered E1-E7 (their own series, kind E)
DennisSmolek Nov 19, 2026
e33bf21
P6.2: register row and code comments as E8 (the experiment series; le…
DennisSmolek Nov 19, 2026
d5d1ccf
P6.1: SHaRC update path split into one pass per ray type (begin, boun…
DennisSmolek Nov 19, 2026
5def2d6
RC4.3: history clamp and change reset measured; D50 rewritten (clamp …
DennisSmolek Nov 19, 2026
81fa7cd
P6.1: insert takes a slot just claimed for the same cell (no duplicat…
DennisSmolek Nov 19, 2026
f002f0f
RC4.3 review: scene-change page (lamp move: settle frames, history ke…
DennisSmolek Nov 19, 2026
6a89db0
P6.2 to review: register E8, design section, NOTES, PROGRESS with the…
DennisSmolek Nov 19, 2026
e703d96
RC4.2 to review: PROGRESS, NOTES, design doc phase notes, TASKS statu…
DennisSmolek Nov 19, 2026
9b09ad8
P6.3: experiment E9, per-hit change reset (cellChangeReset, default o…
DennisSmolek Nov 19, 2026
5b35b92
P6.1: timing page counts the split update passes as cache passes
DennisSmolek Nov 19, 2026
88c52d7
P6.3: experiment E10, the world cache's second bounce read from the t…
DennisSmolek Nov 19, 2026
9866335
P6.3: GPU pages for E10 (radiance-cache-ddgi-bounce: furnace, strips,…
DennisSmolek Nov 19, 2026
64522cb
P6.1 follow-ups: split timing (Sponza 24.7 to 7.8 ms), NOTES, registe…
DennisSmolek Nov 19, 2026
331ed97
P6.3: E10 page sections from the environment (for mutation runs); cos…
DennisSmolek Nov 19, 2026
0105e7a
P6.3 to review: register E9, design section, NOTES, PROGRESS, TASKS row
DennisSmolek Nov 19, 2026
b51552d
P6.2b: renamed from P6.3; cellChangeResetHistory (history kept on a m…
DennisSmolek Nov 19, 2026
8776375
P6.3: cost page sweeps DDGI's probes a frame (gi1-rays with DDGI idle…
DennisSmolek Nov 19, 2026
3f37a36
P6.2b: noise page on Sponza's sun and two-room's lamp; cost page adds…
DennisSmolek Nov 19, 2026
369e7cf
Merge remote-tracking branch 'origin/radiance-cache' into rc4-2
DennisSmolek Nov 19, 2026
d54b180
World-cache page: the strips' ray mean against one frame's noisy mean…
DennisSmolek Nov 19, 2026
847d092
P6.3: E10 page case 6b (every ray bypasses), for the bypass routing; …
DennisSmolek Nov 19, 2026
61c7e79
RC4.3 review rework: soft change reset, short-history clamp, scene-ch…
DennisSmolek Nov 19, 2026
4f13852
P6.2b: noise after a change and E9's cost in PROGRESS and the design doc
DennisSmolek Nov 19, 2026
f099343
RC4.3: denoiserHistoryClip setting; the denoiser link pinned (linkedS…
DennisSmolek Nov 19, 2026
89b7d33
linked-siblings: clone with long paths and without LFS objects
DennisSmolek Nov 19, 2026
6125477
RC4.2 review: SSGI running means (D60), image-plane slices (D58), dep…
DennisSmolek Nov 19, 2026
6bf2cf9
P6.1 review: path lists sized by updateFraction (refused and counted)…
DennisSmolek Nov 19, 2026
509bdbd
RC4.3 PROGRESS: historyClip setting, the pinned and checked denoiser …
DennisSmolek Nov 19, 2026
b169e8d
RC4.2 review: slab scene across the down pass; register D56, D58-D60,…
DennisSmolek Nov 19, 2026
06c197e
P6.1 review: lag page tallies flicker in a histogram; register E7a/E7…
DennisSmolek Nov 19, 2026
ae6b7ea
Merge radiance-cache (TASKS RC4.5)
DennisSmolek Nov 19, 2026
a3eab8b
Export fingerprintDifferences and halfToFloat through platform/contra…
DennisSmolek Nov 19, 2026
0eabcac
P6.1 review: rows E7a/E7b in code comments (P6.2 holds E8 on)
DennisSmolek Nov 19, 2026
b16604b
Review fixes: ChangeEventTracker (platform contract) for E8, E9 and D…
DennisSmolek Nov 19, 2026
7ec6bd1
P6.4: link @pathtracer/mlp from pmndrs/pathtracer at 0e4435b (pinned,…
DennisSmolek Nov 19, 2026
9eddc57
RC4.5: radiance-cache settings that bring back Capsaicin's temporal r…
DennisSmolek Nov 19, 2026
c1901d5
RC4.4: radiance-cache-accuracy page (GI term, composite and world cac…
DennisSmolek Nov 19, 2026
0a79b78
RC4.5: the viewer's 'Radiance cache · compare' section drawn from the…
DennisSmolek Nov 19, 2026
82f2915
RC4.5: design doc's compare-toggle registry section; register rows na…
DennisSmolek Nov 19, 2026
c0c74c3
P6.4: neural tail (register E11): @pathtracer/mlp as the GI-1.2 grid'…
DennisSmolek Nov 19, 2026
5470b1b
RC4.5: PROGRESS, NOTES, row to review
DennisSmolek Nov 19, 2026
66b76bd
RC4.4: reference files listed by the test server (no 404 probes); thr…
DennisSmolek Nov 19, 2026
1e5f2f2
RC4.5: compare panel layout: checkbox rows on their own lines, the pa…
DennisSmolek Nov 19, 2026
ba55a64
RC4.4: accuracy contact sheet fits the runner's window
DennisSmolek Nov 19, 2026
a0d5287
RC4.4 to review: accuracy numbers (bench/results/radiance-cache-accur…
DennisSmolek Nov 19, 2026
91441ca
RC4.4 done (accuracy page vs Cycles); RC3.6 row: more than two bounce…
DennisSmolek Nov 19, 2026
80867d9
P6.3 to review: register E10, design section, NOTES, PROGRESS with th…
DennisSmolek Nov 19, 2026
09899cd
Merge radiance-cache (91441ca, RC4.4 accuracy page) into p6-ddgi-bounce
DennisSmolek Nov 19, 2026
40294e3
P6.3: accuracy page runs E10's settings (DDGI stacked under the cache…
DennisSmolek Nov 19, 2026
383ef14
P6.4: fit the network's tiled kernels to the device's 16 KiB workgrou…
DennisSmolek Nov 19, 2026
566f80d
P6.3: accuracy page E10 setting with history off
DennisSmolek Nov 19, 2026
8c91211
P6.1 review: results (lag, flicker, edge, memory, timing), six mutati…
DennisSmolek Nov 19, 2026
6adaab4
Merge origin/radiance-cache (91441ca: public helpers, RC4.4 accuracy …
DennisSmolek Nov 19, 2026
2d560d2
RC3.4 follow-up: register D50, NOTES (Bistro after D50 and RC4.1, the…
DennisSmolek Nov 19, 2026
ab0ea61
Review fixes: 'target' is reserved in WGSL; design doc for the change…
DennisSmolek Nov 19, 2026
73e81cc
P6.3: E10 against Cycles: accuracy rows, PROGRESS table, NOTES, desig…
DennisSmolek Nov 19, 2026
54739df
radiance-cache-accuracy: VITE_RC_ACCURACY_WORLD_CACHE=sharc for a run…
DennisSmolek Nov 19, 2026
6ca06b5
P6.1: merge checks pass; PROGRESS, TASKS (ready for done; accuracy ru…
DennisSmolek Nov 19, 2026
b74ea0f
P6.1 done: SHaRC-style world cache merged as an opt-in backend
DennisSmolek Nov 19, 2026
352e8ba
Merge radiance-cache (b74ea0f, P6.1 merged) into p6-ddgi-bounce
DennisSmolek Nov 19, 2026
5c25ef2
P6.4 page: wall judge above 3 m, GI-1.2 at 8 px recorded, every-bounc…
DennisSmolek Nov 19, 2026
9e714ac
P6.3 review fixes: secondBounce 'auto' (default) | 'gi1-rays' | 'fall…
DennisSmolek Nov 19, 2026
3a339ef
RC4.2: SSGI off by default (D61, Dennis); pages opt in
DennisSmolek Nov 19, 2026
b9db80f
Merge origin/radiance-cache b74ea0f (P6.1 SHaRC, RC4.4) into rc3-4; R…
DennisSmolek Nov 19, 2026
de0e4b8
P6.3 review: register E10 and design section rewritten (auto default,…
DennisSmolek Nov 19, 2026
48b9cad
P6.3 review fixes verified: PROGRESS, NOTES, TASKS row (review), doc …
DennisSmolek Nov 19, 2026
7f91095
P6.3 done: DDGI as the second bounce, secondBounce 'auto' default
DennisSmolek Nov 19, 2026
01f268f
RC3.4 review fixes: analytic gates on second bounces landing in floor…
DennisSmolek Nov 19, 2026
8ffa53e
P6.4 timing page: device with shader-f16 and the adapter's workgroup …
DennisSmolek Nov 19, 2026
bc16106
Merge origin/radiance-cache 7f91095 (P6.3) into rc3-4: the sky word w…
DennisSmolek Nov 19, 2026
10da552
Review fixes: separate placeholders (writable bindings mustn't alias)
DennisSmolek Nov 19, 2026
c161946
RC3.4 review: register D59/D60 updated (bit from the contract, fallba…
DennisSmolek Nov 19, 2026
155ee53
Review fixes: lit slots from each bin's cursor; indirect cut to one s…
DennisSmolek Nov 19, 2026
4b54a95
RC4.5: temporal and stability numbers for ours and each Capsaicin val…
DennisSmolek Nov 19, 2026
c38b773
P6.4: TASKS row
DennisSmolek Nov 19, 2026
05f8fa0
Merge origin/radiance-cache (7f91095: P6.1 SHaRC, RC4.4 accuracy page…
DennisSmolek Nov 19, 2026
ed579ff
P6.4: PROGRESS (results, Mac run list), register E11 numbers
DennisSmolek Nov 19, 2026
34b4bb7
RC4.5: PROGRESS for the merge and the new toggles
DennisSmolek Nov 19, 2026
1d34f64
RC4.5 done; RC4.6 row: the viewer stacks DDGI under the radiance cach…
DennisSmolek Nov 19, 2026
4f60ee5
Merge radiance-cache 7f91095 (P6.1 SHaRC, RC4.4 accuracy, P6.3 second…
DennisSmolek Nov 19, 2026
28a5a7a
RC4.2 review fixes: PROGRESS, NOTES, TASKS, SSGI cost page on its own…
DennisSmolek Nov 19, 2026
bf1782a
Platform device asks for shader-f16 and the adapter's workgroup memor…
DennisSmolek Nov 19, 2026
c2b179f
RC4.6: the viewer's rc entry stacks the scene's DDGI volume under the…
DennisSmolek Nov 19, 2026
06b736b
Review fixes: PROGRESS, TASKS, register E8/E9, NOTES, API doc names t…
DennisSmolek Nov 19, 2026
f92a6e5
P6.4 page: section 6, the tail with DDGI stacked (off with one warnin…
DennisSmolek Nov 19, 2026
536bfaa
Merge origin/radiance-cache (1d34f64) into rc4-2; compare toggles for…
DennisSmolek Nov 19, 2026
86c343e
Merge radiance-cache 1d34f64 (P6.1, P6.3, RC4.5); E9 history 0 by def…
DennisSmolek Nov 19, 2026
0df18a0
RC4.2: ray-guiding correction (D62): each cell's step weighted by its…
DennisSmolek Nov 19, 2026
8e0b194
SHaRC page: its lag gate against GI-1.2 without E9 (the baseline it w…
DennisSmolek Nov 19, 2026
2a3f214
RC4.6: PROGRESS (viewer runs, accuracy of what the viewer shows), row…
DennisSmolek Nov 19, 2026
ccb82ff
RC4.6 done: the viewer shows the shipped default (DDGI under the radi…
DennisSmolek Nov 19, 2026
d660c6b
P6.4 follow-ups: PROGRESS, TASKS
DennisSmolek Nov 19, 2026
92a90f1
RC4.6b: the viewer's rc entry runs the stacked DDGI's warm-up before …
DennisSmolek Nov 19, 2026
fc9a85b
P6.2b: merge verified on the GPU; PROGRESS
DennisSmolek Nov 19, 2026
c940e71
Merge radiance-cache ccb82ff (RC4.6); P6.2 and P6.2b ready to land
DennisSmolek Nov 19, 2026
b6f7521
P6.2/P6.2b ready to land: GPU runs on the RC4.6 merge
DennisSmolek Nov 19, 2026
f2e6cfb
P6.2 and P6.2b done: budgeted cell shading (opt-in) and change flaggi…
DennisSmolek Nov 19, 2026
f7a46f6
Register D62
DennisSmolek Nov 19, 2026
c0a098a
RC4.6b: SHaRC against Cycles (cache alone), and the warmed viewer's c…
DennisSmolek Nov 19, 2026
a874df2
Merge radiance-cache into rc4-6b
DennisSmolek Nov 19, 2026
8709791
Merge origin/radiance-cache (f2e6cfb) into rc4-2; the filter writes a…
DennisSmolek Nov 19, 2026
95d82fa
Merge radiance-cache f2e6cfb (P6.2/P6.2b: cell shading, change events…
DennisSmolek Nov 19, 2026
081cffd
RC3.4: register rows renumbered D62 (sky light) and D63 (unlit hits):…
DennisSmolek Nov 19, 2026
6f9d75e
Merge origin/radiance-cache a874df2 into rc3-4; compare toggle for th…
DennisSmolek Nov 19, 2026
c45883d
API docs: LIGHT_GROUP_COUNT, DIRECT_SKY_LIGHT_BIT and DIRECT_SKY_LIGH…
DennisSmolek Nov 19, 2026
e4653ff
Doc snippets regenerated (line numbers)
DennisSmolek Nov 19, 2026
342f553
P6.4 review fixes: optional pathtracer sibling (dynamic import, vite/…
DennisSmolek Nov 19, 2026
71a8226
P6.4 page: a fresh adapter for the default-limits device
DennisSmolek Nov 19, 2026
780348a
P6.4 page: a fresh adapter for the default-limits device
DennisSmolek Nov 19, 2026
a036bcb
P6.4 page: section 10, a sky and no sun (the tail brings no sky)
DennisSmolek Nov 19, 2026
ee25a72
DECISIONS 2026-11-23: world-cache alternatives stay variants until co…
DennisSmolek Nov 22, 2026
3a6ba15
WIP (agent stopped 2026-11-20): NOTES line
DennisSmolek Nov 23, 2026
e5d4083
WIP (agent stopped 2026-11-20): unfinished NOTES, register and neural…
DennisSmolek Nov 23, 2026
9a297f7
Merge remote-tracking branch 'origin/radiance-cache' into rc3-4
DennisSmolek Nov 23, 2026
8798029
RC4.2: ray-guiding correction renumbered D62 -> D64 (RC3.4 owns D62 a…
DennisSmolek Nov 23, 2026
0e51307
P6.4: restore the screen records' miss target (mutation M7 left in th…
DennisSmolek Nov 23, 2026
0b88bb9
Merge remote-tracking branch 'origin/radiance-cache' into p6-nrc
DennisSmolek Nov 23, 2026
a7d76ff
RC4.2: design doc compare table lists D59, D60, D61 and D64's toggles
DennisSmolek Nov 23, 2026
719c609
P6.4: a compare toggle for neuralCache (rcneural, read at prepare); t…
DennisSmolek Nov 23, 2026
5cdf45c
P6.4 review: unit tests for the optional sibling's states (ready at t…
DennisSmolek Nov 23, 2026
ea54d81
P6.4 review: the sibling test's entry matches SiblingEntry (typecheck)
DennisSmolek Nov 23, 2026
be528f8
P6.4 review: THIRD_PARTY row as the tail is now (EMA an option, hit-o…
DennisSmolek Nov 23, 2026
28c9473
P6.4 page: section 11, nothing on the screen: no records, so the GPU …
DennisSmolek Nov 23, 2026
48eb622
RC4.2: the temporal page gates sparse rays' mean (D64; RC4.1's weight…
DennisSmolek Nov 23, 2026
6fb9f56
Doc snippets regenerated (line numbers)
DennisSmolek Nov 23, 2026
4901479
RC4.2: D64's GPU numbers in the register and NOTES (RTX 3060)
DennisSmolek Nov 23, 2026
a8377b0
Merge origin/radiance-cache (ee25a72: RC4.6b, DECISIONS 2026-11-23) i…
DennisSmolek Nov 23, 2026
6df1baa
P6.4 page: section 10 also gates the screen records' targets (mutatio…
DennisSmolek Nov 23, 2026
96e381b
RC4.2: temporal page section 7, light appearing in a dark direction (…
DennisSmolek Nov 23, 2026
cbaaa9e
RC4.2: section 7 runs 120 frames after the sky lights up (the taps av…
DennisSmolek Nov 23, 2026
cf09f2e
P6.4 NOTES: the lag bullet as the 2026-11-23 run reads it (the change…
DennisSmolek Nov 23, 2026
849168d
P6.4 review fixes: PROGRESS, TASKS row, E11 timing as measured on 202…
DennisSmolek Nov 23, 2026
1aa7810
P6.4 page: comments on the 32 px furnace and the strips as the hit-on…
DennisSmolek Nov 23, 2026
4b5bc58
RC4.2: near-field page reads the filter's output where it is (the atl…
DennisSmolek Nov 23, 2026
b6f5938
RC4.2: register D42 names its new gate (temporal section 7)
DennisSmolek Nov 23, 2026
abad5af
P6.4 review 2, fixes 1-2: a step count copied before a restart is dro…
DennisSmolek Nov 23, 2026
e22ba49
P6.4 page: section 12, the box centred again: use_neural_tail 0 on th…
DennisSmolek Nov 23, 2026
0184997
P6.4 review 2, fix 3: a production build gets the optional sibling's …
DennisSmolek Nov 23, 2026
4034849
P6.4 review 2, fix 4: the params test parses NeuralTailParams; the ta…
DennisSmolek Nov 23, 2026
0c29927
P6.4 page: section 6's comment says why 0 steps no longer depends on …
DennisSmolek Nov 23, 2026
188e506
RC3.4 verified on radiance-cache ee25a72: all touched GPU pages pass …
DennisSmolek Nov 23, 2026
89cd098
P6.4 page: section 12 reads use_neural_tail from the grid's constants…
DennisSmolek Nov 23, 2026
2b742b0
RC3.4 (lead's ruling): cell-shading and ddgi-bounce gate GI-1.2's sec…
DennisSmolek Nov 23, 2026
89f48bc
TASKS: RC4.2 ready to merge
DennisSmolek Nov 23, 2026
df2688f
radiance-cache-accuracy takes VITE_RC_COMPARE (under each configurati…
DennisSmolek Nov 23, 2026
55048b9
P6.4 independent review: PROGRESS and TASKS (ready to merge; follow-u…
DennisSmolek Nov 23, 2026
2803c25
RC4.2 PROGRESS: ready to merge; D64 against Cycles and on the stabili…
DennisSmolek Nov 23, 2026
3caef5f
Merge origin/radiance-cache (2803c25: RC4.2, D64, P6.1-P6.3, RC4.5, R…
DennisSmolek Nov 23, 2026
8217a99
Merge remote-tracking branch 'origin/radiance-cache' into rc3-4
DennisSmolek Nov 23, 2026
38476cc
RC4.3 after the merge: settings.ts seam fixed; RC4.3's register rows …
DennisSmolek Nov 23, 2026
1d8676c
RC4.5's denoiser toggles: denoiser on/off (D65), history clamp, clamp…
DennisSmolek Nov 23, 2026
03d5f8a
radiance-cache-viewer after the merge: the composite check reads the …
DennisSmolek Nov 23, 2026
9704471
RC3.4 ready to merge: gate rulings verified on radiance-cache 2803c25…
DennisSmolek Nov 23, 2026
e18e916
Merge remote-tracking branch 'origin/radiance-cache' into p6-nrc
DennisSmolek Nov 23, 2026
8896723
P6.2 fix 4: ShadeCells draws from HashGridCache_LightMask() (the sky …
DennisSmolek Nov 23, 2026
3b3d440
P6.4 with RC3.4: section 13, strips under a sky with the sky a cache …
DennisSmolek Nov 23, 2026
ffda6c9
Merge origin/radiance-cache (9704471: RC3.4, register D62/D63, sky li…
DennisSmolek Nov 23, 2026
39b5cc6
P6.2 fix 3: ShadeCells takes a sample of 0 for a hit with no light (r…
DennisSmolek Nov 23, 2026
f84511b
wip: budgeted sky and D63 sections (world-cache, ddgi-bounce 6d), cel…
DennisSmolek Nov 23, 2026
92db2d2
Register E11: the sky with RC3.4 checked on the GPU (section 13; the …
DennisSmolek Nov 23, 2026
5f143ec
TASKS: RC4.3 ready to merge; PROGRESS: merged radiance-cache 9704471,…
DennisSmolek Nov 23, 2026
be992f6
world-cache page: a budgeted cell's bound adds one sample's weight (a…
DennisSmolek Nov 23, 2026
bf33699
Merge remote-tracking branch 'origin/radiance-cache' into p6-2-followups
DennisSmolek Nov 23, 2026
380f0a0
P6.4: PROGRESS and TASKS drafts for the RC3.4 merge (numbers follow)
DennisSmolek Nov 23, 2026
393701e
Merge remote-tracking branch 'origin/radiance-cache' into p6-nrc
DennisSmolek Nov 23, 2026
01de830
P6.4 after the RC3.4 and RC4.3 merges: PROGRESS, TASKS (one gate for …
DennisSmolek Nov 23, 2026
fefb354
P6.4 page: at 32 px cells gate what the tail adds over GI-1.2's own e…
DennisSmolek Nov 23, 2026
023e34f
radiance-cache-three after RC4.3: the composite check reads the term …
DennisSmolek Nov 23, 2026
1684de1
P6.2 fixes 3-4: register E8, D62, D63 and the Lever E8 design text; T…
DennisSmolek Nov 23, 2026
4963fce
P6.4 ready to merge: PROGRESS, TASKS, register E11 (32 px gates on wh…
DennisSmolek Nov 23, 2026
3b3054e
Merge remote-tracking branch 'origin/radiance-cache' into p6-2-followups
DennisSmolek Nov 23, 2026
d0ebc06
Merge remote-tracking branch 'origin/radiance-cache' into rc4-3-fix
DennisSmolek Nov 23, 2026
4b8ca5d
P6.2 fixes 3-4 ready to merge: PROGRESS (checks on the 4963fce merge,…
DennisSmolek Nov 23, 2026
903fae0
Merge remote-tracking branch 'origin/radiance-cache' into rc4-3-fix
DennisSmolek Nov 23, 2026
f82c89c
Merge origin/main into rc-into-main (radiance-cache for the PR into m…
DennisSmolek Nov 23, 2026
d47370e
examples/10-debug passes screenUV to giDebugColor (RC2.2's argument);…
DennisSmolek Nov 23, 2026
79bb13f
DECISIONS 2026-11-24: the merge keeps P6.4's review follow-ups under …
DennisSmolek Nov 23, 2026
95728b1
PROGRESS: radiance-cache merged with main for the PR into main, what …
DennisSmolek Nov 23, 2026
5dccfe3
radiance-cache-change-noise takes VITE_RC_COMPARE (RC4.5) and records…
DennisSmolek Nov 23, 2026
6476174
PROGRESS and register E9: two-room's change-noise ratio rose with RC4…
DennisSmolek Nov 23, 2026
1dca081
Compare toggle for RC4.2's probe filter (probeFilter, rcfilter; Capsa…
DennisSmolek Nov 23, 2026
c63ec56
radiance-cache-change-noise: gate the noise E9 adds against half of E…
DennisSmolek Nov 23, 2026
adbabb1
DECISIONS 2026-11-24: E9's noise gate bounds the noise E9 adds agains…
DennisSmolek Nov 23, 2026
7e69488
radiance-cache-change-noise: gated noise takes out the whole image's …
DennisSmolek Nov 23, 2026
05589f0
E9's gate on visible noise: what it can see (cell noise averaged out …
DennisSmolek Nov 23, 2026
6f14f9c
TASKS: E9's noise gate is loose (follow-up from the change-noise ruli…
DennisSmolek Nov 23, 2026
0065265
Merge main (#40, issue #6's blended foliage) into rc-into-main
DennisSmolek Nov 26, 2026
3f343e0
CI step-list test: list the linked-siblings fetch step; PROGRESS for …
DennisSmolek Nov 26, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
5 changes: 5 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,11 @@ jobs:
# The same npm as publish.yml: the packed check runs `npm pack` and
# `npm install`, whose output and behaviour vary by npm major.
- run: npm install -g npm@^11.5.1
# Sibling libraries from local clones (root package.json `linkedSiblings`,
# radiance-cache branch only): each is cloned at its pinned commit and built. An
# optional one this run can't clone (pmndrs/pathtracer is private) is skipped with a
# note: its feature stays off and the GPU pages that need it are left out.
- run: corepack enable && node tools/linked-siblings.ts --fetch
- run: pnpm install --frozen-lockfile
- run: pnpm lint
- run: pnpm typecheck
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/deploy-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ jobs:
with:
node-version: 24
cache: pnpm
# Sibling libraries from local clones; an optional private one is skipped (see ci.yml).
- run: corepack enable && node tools/linked-siblings.ts --fetch
- run: pnpm install --frozen-lockfile
- name: Build the examples site
run: pnpm examples:build
Expand Down
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,8 @@ __pycache__/
/packages/ddgi/README.md
/packages/ddgi/LICENSE
/packages/ddgi/licenses/

# GI-1.0 research: source PDFs aren't redistributable (research/gi-1.0/sources/SOURCES.md); native Capsaicin builds and captures
research/gi-1.0/sources/*.pdf
native/build/
artifacts/native/
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,6 @@
path = native/rtxgi-ddgi
url = https://github.com/DennisSmolek/ddgi-rtxgi.git
branch = ddgi-reference
[submodule "native/capsaicin"]
path = native/capsaicin
url = https://github.com/GPUOpen-LibrariesAndSDKs/Capsaicin.git
660 changes: 660 additions & 0 deletions PROGRESS.md

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,8 @@ MIT, see [LICENSE](LICENSE). The bundled tinybvh, Emscripten runtime and HIPRT c

## Working on this repository

On the radiance-cache branches, first (once): `node tools/linked-siblings.ts --fetch`, which clones and builds the sibling pmndrs/denoiser that the GI denoiser is linked from during development ([docs/HANDOFF-radiance-cache.md](docs/HANDOFF-radiance-cache.md), "The linked denoiser").

```bash
pnpm install
pnpm dev # the viewer: every test scene with GI, its debug views and settings
Expand Down
4 changes: 2 additions & 2 deletions SPEC.md
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ Checked against the r187 source. Runtime confirmation is an M0 spike.
- It never walks an engine's scene graph.
- It never touches an engine's internals.

"The core" here means the platform packages plus every technique. Everything engine-specific lives in an adapter. A lint rule and a CI check enforce this: platform and technique packages may only import from each other.
"The core" here means the platform packages plus every technique. Everything engine-specific lives in an adapter. Lint rules in `eslint.config.mjs` enforce this inside `ddgi-core` (`pnpm lint`; there is no separate CI check yet): no engine or adapter import anywhere in the core; a technique imports only `platform/contract` and its own folder (not the platform's internals, `@pmndrs/bvh` or another technique); the platform never imports a technique. Tests may use platform internals as fixtures.

### Packages

Expand All @@ -151,7 +151,7 @@ Checked against the r187 source. Runtime confirmation is an M0 spike.

Engines are optional peer dependencies.

**Inside the repo,** the platform and the technique stay separate modules (the `@gi/*` names below), with a lint-enforced boundary. When the second technique arrives, the platform can move into its own package (for example `@pmndrs/gi-core`) without changing its API.
**Inside the repo,** the platform and the technique stay separate modules (the `@gi/*` names below), with a lint-enforced boundary (techniques reach the platform only through `platform/contract`). When the second technique arrives, the platform can move into its own package (for example `@pmndrs/gi-core`) without changing its API.

**Platform: shared by every GI method**

Expand Down
175 changes: 175 additions & 0 deletions TASKS.md

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions THIRD_PARTY.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
| HIPRT by Advanced Micro Devices, [GPUOpen-LibrariesAndSDKs/HIPRT](https://github.com/GPUOpen-LibrariesAndSDKs/HIPRT) at commit `0629d08568fff39f9a36bf9ee800fc7bac5bb096` | `packages/bvh/src/gpu-lbvh-wgsl.ts` (WGSL) | MIT; text in `packages/bvh/licenses/hiprt.txt`, also in a `/*! */` comment at the top of `gpu-lbvh-wgsl.ts`, which bundlers keep | Ported to WGSL: the 30-bit Morton code (`expandBits3D`, `computeMortonCode` in `hiprt/impl/MortonCode.h`), and from `hiprt/impl/LbvhBuilderKernels.h` the key-plus-index comparison (`findHighestDifferentBit`), `findParent` and the bottom-up climb of `EmitTopologyAndFitBounds` (Apetrei 2014). Changed: 64-bit compares as `u32` pairs, cubic Morton cells, atomic hand-over instead of `__threadfence`, SAH leaf collapse, batches, a two-round climb. The radix sort, scans and layout output are ours. |
| three-mesh-bvh 0.9.18 by Garrett Johnson, [gkjohnson/three-mesh-bvh](https://github.com/gkjohnson/three-mesh-bvh) (npm package) | dev dependency of the benchmark pages; `tools/gpu/pages/trace-bench/tmbvh-convert.ts` | MIT | Benchmark reference tracer, and the "built by three-mesh-bvh, traced by ours" experiment (T0.10 part C). No code copied; the converter reads its packed node format as documented in its `src/core/build/buildTree.js`. |
| gputex 0.14.0 by verekia, [verekia/gputex](https://github.com/verekia/gputex) (npm package) | dependency of `apps/viewer` only; used by `apps/viewer/src/scene/compress-textures.ts` | MIT | Compresses the viewer's model textures on the GPU at load (BC7, and BC5 for normal maps, with mip chains) into three `CompressedTexture`s, so Bistro exterior fits a 6 GB GPU (T3.12). Used through its public API (`BC7Encoder`, `BC5Encoder`, `generateGpuMipChain`, `buildCompressedTexture`). No code copied. Not part of the published library. |
| pmndrs/pathtracer's hash-grid radiance cache, [pmndrs/pathtracer](https://github.com/pmndrs/pathtracer) (private sibling, same org) at commit `dd771c815dbd80bd1c7dc78673746a7742c51618`: `bench/nrc/hash-grid.ts`, design in `docs/design/nrc-hash-cache.md` | `packages/ddgi-core/src/techniques/radiance-cache/world-cache/sharc/` (WGSL and TypeScript; not in the published package) | MIT, Copyright (c) 2026 Dennis Smolek (the same author and licence as this repo) | Ported (phase 6 experiment P6.1, the radiance cache's `worldCache: 'sharc'` backend): the cell (SHaRC's LOD rule, the 6 normal bins), the PCG bucket hash and murmur3-finaliser checksum, buckets of 8 with the compare-exchange insert and whole-bucket lookups, the u32 fixed-point accumulation with stochastic rounding, the exponentially weighted resolve with stale eviction, the pyramid and the finest-level-with-enough-samples lookup, and its tuned defaults. Changed: the samples come from update paths started at the probe rays' hits (light sample, bounces, the cache as the tail), the slot's own (register E1-E7). The pathtracer wrote it from the published descriptions of SHaRC and Binder et al. 2019 (arXiv 1902.05942); no NVIDIA SDK code was read or copied there or here. |
| `@pathtracer/mlp` from pmndrs/pathtracer, [pmndrs/pathtracer](https://github.com/pmndrs/pathtracer) (private sibling, same org) at commit `0e4435bd05bf4f55c8763c76facae640db35855c`: `packages/mlp` (a fully fused MLP with online training in WGSL); the NRC record and hook design of `bench/nrc/cache.ts` | an optional development sibling from a local clone (root `package.json` `linkedSiblings`, `optional: true`; resolved by `tools/optional-siblings.ts` and tsconfig `paths`), imported dynamically by `packages/ddgi-core/src/techniques/radiance-cache/neural-cache/mlp-loader.ts` (not in the published package; absent, the tail is off) | MIT, Copyright (c) 2026 Dennis Smolek (the same author and licence as this repo) | Used through its API, not copied (phase 6 experiment P6.4, the radiance cache's `neuralCache: 'tail'`): `MlpEngine` (training steps and tiled inference), `nrcEncodingWgsl` (VkNRC's 64-input layout), `initWeights`, `MLP_SHAPES`, `DEFAULT_TRAIN`. Followed, written here: the pathtracer's NRC defaults (compact network, zero output layer, 16 steps a frame until the gate opens; its warm-up EMA kept as an option, `ema: 'warmup'`, off by default since P6.4's review) and its training-record index hash (`nrcTrainRecordIndex`). Ours: the records (the GI-1.2 grid's indirect values, and visible surfaces' one-ray estimates of the same quantity from the cache's value at the ray's hit), the queries (the second-bounce hits) and where the answers go (register E11). The pathtracer's design follows VkNRC (its D29) after Müller, Rousselle, Novák and Keller, "Real-time Neural Radiance Caching for Path Tracing" (ACM TOG 40(4), SIGGRAPH 2021); no NVIDIA code was read or copied there. |
| NVIDIA RTXGI-DDGI (fork) | `native/rtxgi-ddgi` (submodule) | NVIDIA RTX SDKs license | External comparison and timing tool only. No code or shaders are copied into this library. |
| Amazon Lumberyard Bistro, exterior (NVIDIA ORCA) | `assets/downloads/bistro-exterior` (downloaded, not committed) | [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/legalcode), source [ORCA page](https://developer.nvidia.com/orca/amazon-lumberyard-bistro) | Test scene |
| Amazon Lumberyard Bistro, interior (NVIDIA ORCA) | `assets/downloads/bistro-interior` (downloaded, not committed) | [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/legalcode), source [ORCA page](https://developer.nvidia.com/orca/amazon-lumberyard-bistro) | Test scene |
Expand Down
11 changes: 11 additions & 0 deletions apps/viewer/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,12 @@
right: 0;
bottom: 0;
width: var(--panel-width);
/* Never wider than the window (phones); it scrolls itself, up and down only. */
max-width: 100vw;
box-sizing: border-box;
padding: 12px 14px 0;
overflow-y: auto;
overflow-x: hidden;
background: var(--bg);
border-left: 1px solid #2a323d;
z-index: 20;
Expand Down Expand Up @@ -145,6 +148,14 @@
.panel .note[hidden] {
display: none;
}
/* A radiance-cache compare toggle away from ours (rc-compare-controls.ts). */
.panel .changed {
border-left: 2px solid var(--accent);
padding-left: 4px;
}
.panel section[hidden] {
display: none;
}
.panel .legend-row {
display: flex;
align-items: center;
Expand Down
39 changes: 39 additions & 0 deletions apps/viewer/src/core/viewer-core.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ import { disposeScene, loadScene, type LoadedScene, type LoadProgress, type Load
import { DdgiTechnique, DEFAULT_DDGI_VIEWER_SETTINGS, layerKey, type DdgiViewerSettings } from '../techniques/ddgi-technique';
import { DEFAULT_LPG_SETTINGS, LightProbeGridTechnique, type LightProbeGridSettings } from '../techniques/light-probe-grid-technique';
import { NoGiTechnique } from '../techniques/no-gi-technique';
import { RADIANCE_CACHE_COMPARE_TOGGLES } from '../../../../packages/ddgi-core/src/techniques/radiance-cache/compare-toggles.ts';
import { DEFAULT_RADIANCE_CACHE_VIEWER_SETTINGS, RadianceCacheViewerTechnique, type RadianceCacheChangeReadout, type RadianceCacheViewerSettings } from '../techniques/radiance-cache-technique';
import { ReferenceImageTechnique } from '../techniques/reference-technique';
import { TECHNIQUE_LABELS, type GiTechnique, type TechniqueContext, type TechniqueId, type UpscaleSettings } from '../techniques/types';
import { DEFAULT_VXGI_SETTINGS, VxgiTechnique, type VxgiSettings } from '../techniques/vxgi-technique';
Expand Down Expand Up @@ -91,6 +93,7 @@ export class ViewerCore {
private probeSettings: LightProbeGridSettings = DEFAULT_LPG_SETTINGS;
private vxgiSettings: VxgiSettings = DEFAULT_VXGI_SETTINGS;
private ddgiSettings: DdgiViewerSettings = DEFAULT_DDGI_VIEWER_SETTINGS;
private radianceCacheSettings: RadianceCacheViewerSettings = DEFAULT_RADIANCE_CACHE_VIEWER_SETTINGS;
/** The camera bookmark the reference image belongs to (the last one chosen). */
private referenceBookmark = 0;
private readonly frameWaiters: Array<(startedAt: number) => void> = [];
Expand Down Expand Up @@ -197,6 +200,8 @@ export class ViewerCore {
switch (id) {
case 'ddgi':
return new DdgiTechnique(context, this.ddgiSettings);
case 'rc':
return new RadianceCacheViewerTechnique(context, this.radianceCacheSettings);
case 'lpg':
return new LightProbeGridTechnique(context, this.probeSettings);
case 'vxgi':
Expand Down Expand Up @@ -281,6 +286,34 @@ export class ViewerCore {
ddgi?.configure(settings);
}

/**
* Applies to the radiance cache now if it exists, and to the one created later (its debug
* view: a uniform and an override material; its compare toggles, live). A compare toggle read
* only at `prepare` (the world-cache backend) starts a new radiance cache instead.
*/
configureRadianceCache(settings: RadianceCacheViewerSettings): void {
const restart = restartKey(settings) !== restartKey(this.radianceCacheSettings);
this.radianceCacheSettings = { ...settings };
const rc = this.techniques.get('rc') as RadianceCacheViewerTechnique | undefined;
if (rc && restart) {
rc.dispose();
this.techniques.delete('rc');
this.prepareStarts.delete(rc);
const shown = this.layout.left === 'rc' || this.layout.right === 'rc';
if (this.loaded && shown) {
this.getTechnique('rc');
this.rebuildOutput();
}
return;
}
rc?.configure(settings);
}

/** The radiance cache's change-per-frame readout (RC4.5) if it has been made and is ready, else null. */
radianceCacheReadout(): RadianceCacheChangeReadout | null {
return (this.techniques.get('rc') as RadianceCacheViewerTechnique | undefined)?.changeReadout ?? null;
}

/** Bakes the probe grid again with its current settings. */
rebake(): void {
this.techniques.get('lpg')?.restartPrepare();
Expand Down Expand Up @@ -472,3 +505,9 @@ export class ViewerCore {
this.device.destroy();
}
}

/** The radiance cache's compare values that are read at `prepare` only (compare-toggles.ts `restartsTechnique`). */
function restartKey(settings: RadianceCacheViewerSettings): string {
const values = settings.compare as Record<string, unknown>;
return JSON.stringify(RADIANCE_CACHE_COMPARE_TOGGLES.filter((entry) => entry.restartsTechnique).map((entry) => values[entry.setting] ?? entry.defaultValue));
}
8 changes: 5 additions & 3 deletions apps/viewer/src/ddgi/debug-material.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
*/

import { DoubleSide, NodeMaterial, type Node } from 'three/webgpu';
import { normalWorld, positionWorld, uniform, vec4, wgsl, wgslFn } from 'three/tsl';
import { normalWorld, positionWorld, screenUV, uniform, vec4, wgsl, wgslFn } from 'three/tsl';
import { wgslParameterType, type ShadingModule } from './library';
import { ShadingNodes } from './shading-nodes';

Expand All @@ -33,10 +33,11 @@ function entryWgsl(shading: ShadingModule): string {
position: vec3f,
normal: vec3f,
view: f32,
screenUV: vec2f,
${declarations}
) -> vec3f {
// Debug view ids are small whole numbers; + 0.5 so the conversion can't round down past one.
return giDebugColor(position, normal, u32(view + 0.5), ${resources});
return giDebugColor(position, normal, u32(view + 0.5), screenUV, ${resources});
}`;
}

Expand All @@ -48,7 +49,8 @@ export class DdgiDebugMaterial {
constructor(shading: ShadingModule) {
this.nodes = new ShadingNodes(shading);
const entry = wgslFn(entryWgsl(shading), [wgsl(shading.code)]);
const color = entry({ position: positionWorld, normal: normalWorld, view: this.viewUniform, ...this.nodes.byName }) as unknown as Node<'vec3'>;
// screenUV: screen-space techniques draw their views by the pixel's place (the radiance cache).
const color = entry({ position: positionWorld, normal: normalWorld, view: this.viewUniform, screenUV, ...this.nodes.byName }) as unknown as Node<'vec3'>;
const material = new NodeMaterial();
material.name = 'ddgi debug view';
material.lights = false;
Expand Down
2 changes: 2 additions & 0 deletions apps/viewer/src/scene/layers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
* DDGI_PROBES DDGI's probe spheres (DDGI's camera, when they are switched on)
* HELPERS the light markers and the light gizmo (every viewing camera; never
* a bake camera, and GI's rays pass through them)
* RADIANCE_CACHE the radiance cache's GI light (only its camera sees it)
*
* Lights follow the camera's layers too (`Renderer.js` tests `light.layers`),
* which is what makes "GI only" possible without touching light intensities.
Expand All @@ -28,6 +29,7 @@ export const LAYER_PROBE_GRID = 3;
export const LAYER_DDGI = 4;
export const LAYER_DDGI_PROBES = 5;
export const LAYER_HELPERS = 6;
export const LAYER_RADIANCE_CACHE = 7;

/**
* - `on`: direct light plus the technique's GI.
Expand Down
Loading
Loading