[rendering] Emissive light build: incremental / amortised cell rebuild and a coarser grid for weak emitters #1006

Open
opened 2026-10-24 01:19:23 +00:00 by sky_line · 0 comments
Owner

At a busy party (RTX 5090, ReSTIR DI 3, emissive on): c_rs_emissive = 4.1 ms/frame on the async lighting chain's head (graphics waits for it), while every other emissive sub-timer sums to ~0.35 ms. It is mode 7 of the emissive build (llcleanprojstochvk.cpp ~663-681): the per-world-grid-cell gather of candidate emitting triangles, every level x every cell, every frame -- independent of screen resolution (half-res signals left it unchanged). Scene: 62 emitters, 12.2k emissive triangles live (cap 16384), 3841 cells with emitting triangles.

Emissive light is mostly soft and weak, so it tolerates being a little stale in time.

Do all three

  1. Incremental rebuild: rebuild only cells whose emitter set changed (emitter moved / appeared / removed / LOD or triangle set changed). Animated emissive textures and colour/glow changes are a cheap per-emitter radiance refresh, not a re-gather.
  2. Amortise: cap the cells re-gathered per frame (e.g. 1/4 of the dirty set, or a budget), oldest first; a cell whose emitters changed a lot (teleport, region change, first frame) is rebuilt at once.
  3. Coarser grid for weak emitters: emitters whose power is low only populate coarser levels (their contribution falls under the noise quickly); tie to the existing level selection.

Keep the look (A/B with the full rebuild); stats/timers for dirty cells, re-gathered cells/frame, staleness; a setting to force the full rebuild for comparison.

At a busy party (RTX 5090, ReSTIR DI 3, emissive on): `c_rs_emissive` = **4.1 ms/frame** on the async lighting chain's head (graphics waits for it), while every other emissive sub-timer sums to ~0.35 ms. It is mode 7 of the emissive build (`llcleanprojstochvk.cpp` ~663-681): the per-**world-grid-cell** gather of candidate emitting triangles, every level x every cell, every frame -- independent of screen resolution (half-res signals left it unchanged). Scene: 62 emitters, 12.2k emissive triangles live (cap 16384), 3841 cells with emitting triangles. Emissive light is mostly soft and weak, so it tolerates being a little stale in time. **Do all three** 1. **Incremental rebuild:** rebuild only cells whose emitter set changed (emitter moved / appeared / removed / LOD or triangle set changed). Animated emissive textures and colour/glow changes are a cheap per-emitter radiance refresh, not a re-gather. 2. **Amortise:** cap the cells re-gathered per frame (e.g. 1/4 of the dirty set, or a budget), oldest first; a cell whose emitters changed a lot (teleport, region change, first frame) is rebuilt at once. 3. **Coarser grid for weak emitters:** emitters whose power is low only populate coarser levels (their contribution falls under the noise quickly); tie to the existing level selection. Keep the look (A/B with the full rebuild); stats/timers for dirty cells, re-gathered cells/frame, staleness; a setting to force the full rebuild for comparison.
sky_line added this to the Slipstream project 2026-10-24 01:19:23 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
sky_line/Slipstream#1006
No description provided.