Skip to content

Solari v8: Disable ReSTIR by default - #25513

Open
JMS55 wants to merge 1 commit into
bevyengine:mainfrom
JMS55:solari8-no-restir
Open

Solari v8: Disable ReSTIR by default#25513
JMS55 wants to merge 1 commit into
bevyengine:mainfrom
JMS55:solari8-no-restir

Conversation

@JMS55

@JMS55 JMS55 commented Aug 22, 2026

Copy link
Copy Markdown
Contributor

Objective

  • Denoisers are already spatial and temporal reuse. Do we need ReSTIR? Testing shows, not really!
  • For direct lighting, plain RIS is already pretty good (and I plan on adding ReGIR), and for indirect lighting, the world cache helps (and we could use it to further guide screen-space paths). It's better to use cheap methods to reduce noise, and then lean on the denoiser for the rest from what I've found.

Solution

  • Add a ReSTIR toggle to SolariLighting (ReSTIR is now off by default)
  • Without ReSTIR, performance is ~twice as fast on my RTX 3080. There's also significant memory savings (need less buffers, and no temporal TLAS!) , a significant reduction in code complexity (ReSTIR adds so much math that's very easy to get wrong), and avoids issues like correlations and boiling that confuses the denoiser.
  • The only downside is that quality is regressed a little bit, notably in small shadow detail, and in tricky lighting conditions. For most people, I think the vast performance increase is very much worth it.

AI was used to perform the vast majority of the mechanical work here, as it's mostly boring plumbing.


Showcase

ReSTIR Enabled
https://cdn.discordapp.com/attachments/1385299007445930135/1540790234495713350/image.png?ex=6a8b3c3a&is=6a89eaba&hm=a700233fd6b6b0570ba8c7555605221fd37ac3ea3959d5b1ca6a35d677298dcd&
https://cdn.discordapp.com/attachments/1385299007445930135/1540790314636410941/image.png?ex=6a8b3c4d&is=6a89eacd&hm=d0a9fac32c024c1c6a88355961851ef4e64ca3f354de8a9191daedd6c1a646e3&

ReSTIR Disabled
https://cdn.discordapp.com/attachments/1385299007445930135/1540790233594069103/image.png?ex=6a8b3c3a&is=6a89eaba&hm=9ad094f65e4e6966d65d3c723defe94434a342d3960b66b7bf3841ef26533e14&
https://cdn.discordapp.com/attachments/1385299007445930135/1540790315638587464/image.png?ex=6a8b3c4d&is=6a89eacd&hm=afd72bc11ea8417e10db34ba2ae3f2dc39147157274f8a13c14f41cb687d3e02&

@JMS55
JMS55 requested review from SparkyPotato, stuartparmenter and tychedelia and removed request for stuartparmenter August 22, 2026 18:42
@JMS55 JMS55 added A-Rendering Drawing game state to the screen C-Performance A change motivated by improving speed, memory usage or compile times D-Straightforward Simple bug fixes and API improvements, docs, test and examples S-Needs-Review Needs reviewer attention (from anyone!) to move forward labels Aug 22, 2026
@github-project-automation github-project-automation Bot moved this to Needs SME Triage in Rendering Aug 22, 2026
///
/// This is useful for temporal techniques that need last frame's data.
#[derive(Resource, Default)]
pub struct RaytracingSceneNeedsPreviousFrameData;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

setup_raytracing_scene_needs_previous_frame_data can remove this every frame, might be worth updating the docs

Comment on lines +247 to +248
} else {
if deferred_double_buffered {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Anyone actually using these in their app would break if these get removed here wouldn't they?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-Rendering Drawing game state to the screen C-Performance A change motivated by improving speed, memory usage or compile times D-Straightforward Simple bug fixes and API improvements, docs, test and examples S-Needs-Review Needs reviewer attention (from anyone!) to move forward

Projects

Status: Needs SME Triage

Development

Successfully merging this pull request may close these issues.

2 participants