[Epic] Emissive surfaces as light sources (RT emissive lighting) #91

Open
opened 2026-09-27 06:34:26 +00:00 by sky_line · 1 comment
Owner

Goal: emissive surfaces actually light the world - neon signs, glowing prims, lamp shades, screens, fullbright+glow builds cast light (and soft shadows) onto nearby surfaces, instead of glow being only a screen-space bloom.

Today SL "glow" is a post-process halo; emissive/fullbright surfaces light nothing. With RT we can make them real light sources - a big step for SL's many lit-by-texture builds.

Two tiers

Tier 1 - emissive in GI (falls out of #87, make sure it's in scope there): probe rays that hit emissive surfaces add the surface's emitted radiance (PBR emissive factor x texture, legacy fullbright/glow mapped to an emissive estimate) to probe irradiance. Soft, low-frequency ambient contribution; cheap; no extra ray budget.

Tier 2 - emissive area lights (this ticket's core):

  • Build an emissive triangle list GPU-side from the instance/material tables (instances whose material has emissive/glow above a threshold), with per-triangle power estimates (area x average emissive texel luminance, e.g. from a low mip).
  • Light sampling: importance-sample emissive triangles (power-weighted, or a light BVH/alias table), combined with ReSTIR DI (reservoir resampling, temporal + spatial reuse) so thousands of emissive triangles cost a few rays per pixel.
  • Visibility via the existing ray-query shadow path (alpha-tested, translucent casters).
  • Denoise with the shared RT denoiser (#85); temporal reuse needs the temporal pipeline (#84).

Design notes

  • Legacy content mapping: fullbright + glow faces are SL's de-facto "emissive"; define how glow strength / fullbright colour maps to radiance so old builds light up plausibly without blowing out. Setting to scale or disable per class.
  • Animated emissive textures (signs, screens): sample the current frame's mip; power estimate updated when the texture/anim changes.
  • Media-on-a-prim screens as light sources (TV lighting a room) - optional stretch.
  • Budget: cap emissive triangle count / use per-instance aggregation for dense emissive meshes.

Children

  1. Emissive radiance in GI hit shading (tier 1; coordinate with #87).
  2. GPU emissive triangle list + power estimation.
  3. Light sampling + ReSTIR DI resampling pass.
  4. Shading integration in the lit pass + denoiser hookup.
  5. Legacy glow/fullbright mapping + settings + GPU timers.

Size: L. Depends on: RT foundation (done), #84 temporal pipeline, #85 denoiser; tier 1 rides on #87.

**Goal:** emissive surfaces actually light the world - neon signs, glowing prims, lamp shades, screens, fullbright+glow builds cast light (and soft shadows) onto nearby surfaces, instead of glow being only a screen-space bloom. Today SL "glow" is a post-process halo; emissive/fullbright surfaces light nothing. With RT we can make them real light sources - a big step for SL's many lit-by-texture builds. ### Two tiers **Tier 1 - emissive in GI (falls out of #87, make sure it's in scope there):** probe rays that hit emissive surfaces add the surface's emitted radiance (PBR emissive factor x texture, legacy fullbright/glow mapped to an emissive estimate) to probe irradiance. Soft, low-frequency ambient contribution; cheap; no extra ray budget. **Tier 2 - emissive area lights (this ticket's core):** - Build an **emissive triangle list** GPU-side from the instance/material tables (instances whose material has emissive/glow above a threshold), with per-triangle power estimates (area x average emissive texel luminance, e.g. from a low mip). - **Light sampling:** importance-sample emissive triangles (power-weighted, or a light BVH/alias table), combined with **ReSTIR DI** (reservoir resampling, temporal + spatial reuse) so thousands of emissive triangles cost a few rays per pixel. - Visibility via the existing ray-query shadow path (alpha-tested, translucent casters). - Denoise with the shared RT denoiser (#85); temporal reuse needs the temporal pipeline (#84). ### Design notes - **Legacy content mapping:** fullbright + glow faces are SL's de-facto "emissive"; define how glow strength / fullbright colour maps to radiance so old builds light up plausibly without blowing out. Setting to scale or disable per class. - Animated emissive textures (signs, screens): sample the current frame's mip; power estimate updated when the texture/anim changes. - Media-on-a-prim screens as light sources (TV lighting a room) - optional stretch. - Budget: cap emissive triangle count / use per-instance aggregation for dense emissive meshes. ### Children 1. Emissive radiance in GI hit shading (tier 1; coordinate with #87). 2. GPU emissive triangle list + power estimation. 3. Light sampling + ReSTIR DI resampling pass. 4. Shading integration in the lit pass + denoiser hookup. 5. Legacy glow/fullbright mapping + settings + GPU timers. **Size:** L. **Depends on:** RT foundation (done), #84 temporal pipeline, #85 denoiser; tier 1 rides on #87.
sky_line added this to the Slipstream project 2026-10-06 15:04:15 +00:00
Author
Owner

Direction decided 2026-10-10: ReSTIR DI powers both this and #439

We'll build ReSTIR DI (reservoir-based spatiotemporal importance resampling; Bitterli et al. 2020, as in RTXDI / UE MegaLights) as the shared many-light direct-lighting system. Point lights (#439), projectors and emissive triangles (this ticket) are all candidates in one light pool.

Pipeline (opaque, G-buffer pixels):

  1. Initial candidates per pixel from a GPU light buffer (all point/spot lights and emissive triangles, power-weighted alias table or light BVH).
  2. Temporal reuse via motion vectors.
  3. Spatial reuse with depth/normal similarity.
  4. One visibility ray per pixel to the chosen light through the existing TLAS and opacity micromaps.
  5. Shade, then denoise (start from the shadow SVGF).

Run at half res with upsample.

What it replaces:

  • the per-pixel clustered localLights() loop for opaque surfaces;
  • the RT mask's 4 projector slots and any "top N shadowed lights" selection.

What stays:

  • the dedicated sun/moon ray (one dominant light);
  • the clustered loop for transparents, water and particles;
  • probes, SSR, AO and GI (indirect light);
  • BLAS/TLAS/OMM (ReSTIR uses them for visibility).

Cost estimates:

  • VRAM: reservoirs (current + previous) ~64-128 MB at half res, plus light/emissive tables (a few MB) and denoiser history. Net ~+100-200 MB.
  • GPU: ~1-2 ms at 4K on a 5090, partly async. In today's scenes that's ~+0.5-1.5 ms net vs. the current loop. It is a quality feature: every light can shadow, at a cost roughly independent of light count; cheaper than per-light shadow rays once many lights are shadowed.

SL content rules:

  • Emissive mapping must be conservative: PBR emissive plus glow above a threshold; legacy fullbright alone does not emit. Scale and disable per class.
  • Own-fixture exclusion for point lights (see #439).
  • Blinking/animated lights need history rejection; avatars need reactive masks.

Tier 1 (emissive in GI) still waits on #87.

## Direction decided 2026-10-10: ReSTIR DI powers both this and #439 We'll build **ReSTIR DI** (reservoir-based spatiotemporal importance resampling; Bitterli et al. 2020, as in RTXDI / UE MegaLights) as the shared many-light direct-lighting system. Point lights (#439), projectors and emissive triangles (this ticket) are all candidates in one light pool. **Pipeline (opaque, G-buffer pixels):** 1. Initial candidates per pixel from a GPU light buffer (all point/spot lights and emissive triangles, power-weighted alias table or light BVH). 2. Temporal reuse via motion vectors. 3. Spatial reuse with depth/normal similarity. 4. One visibility ray per pixel to the chosen light through the existing TLAS and opacity micromaps. 5. Shade, then denoise (start from the shadow SVGF). Run at half res with upsample. **What it replaces:** - the per-pixel clustered `localLights()` loop for opaque surfaces; - the RT mask's 4 projector slots and any "top N shadowed lights" selection. **What stays:** - the dedicated sun/moon ray (one dominant light); - the clustered loop for transparents, water and particles; - probes, SSR, AO and GI (indirect light); - BLAS/TLAS/OMM (ReSTIR uses them for visibility). **Cost estimates:** - VRAM: reservoirs (current + previous) ~64-128 MB at half res, plus light/emissive tables (a few MB) and denoiser history. Net ~+100-200 MB. - GPU: ~1-2 ms at 4K on a 5090, partly async. In today's scenes that's ~+0.5-1.5 ms net vs. the current loop. It is a quality feature: every light can shadow, at a cost roughly independent of light count; cheaper than per-light shadow rays once many lights are shadowed. **SL content rules:** - Emissive mapping must be conservative: PBR emissive plus glow above a threshold; legacy fullbright alone does not emit. Scale and disable per class. - Own-fixture exclusion for point lights (see #439). - Blinking/animated lights need history rejection; avatars need reactive masks. **Tier 1 (emissive in GI)** still waits on #87.
Sign in to join this conversation.
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#91
No description provided.