Skip to content
SpecializedSource checked

ReSTIR Sampling

Reuses light samples with reservoir sampling to improve direct lighting estimates.

Quick Facts

Compact metadata for implementation and discovery.

Category
Rendering
Difficulty
Advanced
Family
Light Transport Sampling
Tier
Specialized
Status
Verified
Review
Source Checked
Sources
1
Formulas
1
Relationships
2
Code example
Ready
Visualization
Ready
Aliases
Reservoir Spatio-Temporal Importance Resampling

Overview

ReSTIR keeps weighted sample reservoirs per pixel and shares them across time or space so difficult lighting can be sampled more efficiently.

Core Concepts

reservoir samplingimportance weightspatiotemporal reusedirect lighting

Quick facts

Complexity

Runtime and memory behavior at a glance.

Best

O(samples)

Average

O(pixels * candidates)

Worst

O(pixels * candidates)

Space

O(pixels)

When to Use

  • Use when real-time graphics needs reservoir sampling.
  • Use when the input matches the assumptions behind light Transport Sampling.

When Not to Use

  • Avoid when the effect costs more than the visual improvement for the target hardware.
  • Avoid when a simpler algorithm gives the required result with less setup.

What It Does

  • Reuses light samples with reservoir sampling to improve direct lighting estimates
  • Uses reservoir sampling and importance weight to guide the work.
  • Produces rendered image.

Use Cases

  • Real-time graphics
  • Offline rendering
  • Lighting and visibility effects

Inputs

  • Scene geometry
  • Materials
  • Camera and lighting state

Outputs

  • Rendered image
  • Visibility or shading buffers

Key Formulas (1)

Reservoir weight

W = sumweights / selectedweight
W = sum_weights / selected_weight

Tracks how a selected sample represents the full candidate set.

Pseudocode

  1. 1.Prepare the inputs and state needed for ReSTIR Sampling.
  2. 2.Apply the reservoir sampling step while the stopping condition has not been met.
  3. 3.Update intermediate state and discard invalid candidates.
  4. 4.Return rendered image.

Canonical Example

Input
ReSTIR Sampling input with a small representative case
Output
Rendered image
Explanation
ReSTIR Sampling applies reservoir sampling to produce rendered image.

Implementation Notes

  • Keep the data space for positions, normals, and samples explicit in the implementation.
  • Keep the reservoir sampling step separate enough to test independently.

Common Pitfalls

  • Mixing coordinate spaces or sampling domains leads to artifacts that are hard to debug.
  • Forgetting to check edge cases can make ReSTIR Sampling look correct on only ideal inputs.

Interactive Mechanism Walkthrough

Spatial Primitive & Sweep-Line Canvas

Show rays, samples, buffers, or shading terms that contribute to the final pixel.

ReSTIR Sampling mechanism walkthrough step 1 of 4
Step 1 of 4: Prepare the inputs and state needed for ReSTIR Sampling.
rendering-mechanism

Notes

ReSTIR depends on reservoir weights and reuse mappings; biased variants reduce noise but can lose energy.

Sources (1)

What each reference supports for this entry.

ReSTIR paper

Paper

NVIDIA research page for spatiotemporal reservoir resampling for dynamic direct lighting.

Open source

Explore Next

Good next jumps from the relationship graph, ranked for useful discovery.

ReSTIR reuses reservoirs to improve difficult light sampling scenarios.

Often paired withPath Tracing

ReSTIR is commonly applied in real-time path tracing pipelines.

Tags

GraphicsSamplingLightingGlobal Illumination