Emissive lights (#91): cache static emitters' triangle records instead of rebuilding every frame #986

Open
opened 2026-10-23 18:07:42 +00:00 by sky_line · 0 comments
Owner

From the 2026-10-23 GI performance pass. Baseline: RTX 5090, 4K, DLSS Ultra Performance (1280x720 render), GI at full render resolution, GI 3 + cache, ReSTIR DI 3, emissive on: GPU 30.9 ms/frame (GPU-bound), async deferred lighting 20.1 ms, c_gi_trace 12.7 ms (883k rays/frame).

c_rs_emissive costs 2.61 ms in an emissive-heavy scene (324 emitting objects, ~165k candidate triangles visited per frame, ~150k skipped over the 16k cap). The build rereads every emitter's triangles from scratch each ReSTIR frame even though they're static.

Plan

Cache triangle records for static emitters, keyed by instance plus transform / material generation. Rebuild only dynamic, animated-texture or changed emitters; keep the per-frame cell build. Keep the light takeover's rows and the fixed-subset rule working.

Estimate

2.6 -> ~0.5 ms. Medium effort.

From the 2026-10-23 GI performance pass. Baseline: RTX 5090, 4K, DLSS Ultra Performance (1280x720 render), GI at full render resolution, GI 3 + cache, ReSTIR DI 3, emissive on: GPU 30.9 ms/frame (GPU-bound), async deferred lighting 20.1 ms, `c_gi_trace` 12.7 ms (883k rays/frame). `c_rs_emissive` costs 2.61 ms in an emissive-heavy scene (324 emitting objects, ~165k candidate triangles visited per frame, ~150k skipped over the 16k cap). The build rereads every emitter's triangles from scratch each ReSTIR frame even though they're static. ## Plan Cache triangle records for static emitters, keyed by instance plus transform / material generation. Rebuild only dynamic, animated-texture or changed emitters; keep the per-frame cell build. Keep the light takeover's rows and the fixed-subset rule working. ## Estimate 2.6 -> ~0.5 ms. Medium effort.
sky_line added this to the Slipstream project 2026-10-23 18:07:42 +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#986
No description provided.