Skip to content

Solari v7#24767

Open
JMS55 wants to merge 27 commits into
bevyengine:mainfrom
JMS55:solari7-unified-restir
Open

Solari v7#24767
JMS55 wants to merge 27 commits into
bevyengine:mainfrom
JMS55:solari7-unified-restir

Conversation

@JMS55

@JMS55 JMS55 commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

This is a major rewrite of Solari.

The old version did DI, diffuse GI, and specular GI / mirror DI in 3 separate passes. Only diffuse rays were resampled, and no rays were traced for cross-domain MIS weight, leading to bias.

This new version is one unified algorithm that handles diffuse and specular DI and GI all in one reservoir. Resampling takes the full BRDF into account, as well as cross-domain visibility in MIS weights.

Advantages:

  • Much less biased
  • Much less prone to GI light-leaks
  • Improved specular GI quality
  • Improved DI quality for nearby lights thanks to BRDF sampling for DI
  • Less memory usage

Disadvantages:

  • A bit slower due to the extra rays traced

Showcase

Reference
image-6-fixed
This PR (with DLSS)
image-7-fixed
Main (with DLSS)
image-9-fixed
This PR
image-8-fixed
Main
image-10-fixed

@JMS55 JMS55 added this to the 0.20 milestone Jun 26, 2026
@JMS55 JMS55 added A-Rendering Drawing game state to the screen D-Complex Quite challenging from either a design or technical perspective. Ask for help! S-Needs-Review Needs reviewer attention (from anyone!) to move forward C-Refinement Improves output quality, without fixing a clear bug or adding new functionality. labels Jun 26, 2026
@github-project-automation github-project-automation Bot moved this to Needs SME Triage in Rendering Jun 26, 2026
@JMS55 JMS55 requested a review from SparkyPotato June 26, 2026 18:36
@JMS55 JMS55 requested a review from IceSentry June 28, 2026 02:56
@github-actions

Copy link
Copy Markdown
Contributor

You added a new example but didn't add metadata for it. Please update the root Cargo.toml file.

Comment thread crates/bevy_solari/src/realtime/world_cache_query.wgsl
Comment thread crates/bevy_solari/src/realtime/world_cache_query.wgsl Outdated
Comment thread crates/bevy_solari/src/realtime/mod.rs Outdated
Comment thread crates/bevy_solari/src/realtime/initial_path.wgsl Outdated
Comment thread crates/bevy_solari/src/realtime/initial_path.wgsl
Comment thread crates/bevy_solari/src/realtime/initial_path.wgsl Outdated
Comment thread crates/bevy_solari/src/realtime/initial_path.wgsl Outdated
Comment thread crates/bevy_solari/src/realtime/initial_path.wgsl Outdated
Comment thread crates/bevy_solari/src/realtime/initial_path.wgsl Outdated
@JMS55 JMS55 requested a review from SparkyPotato June 28, 2026 17:39

@stuartparmenter stuartparmenter left a comment

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.

The math looks right, but given the complexity and to double check it all I ran a small simulation against using your math to check for bias and it looks good after your fixes. I also wired it in to a number of example scenes (bistro, etc) and it looks better / don't see any visual regressions.

Comment thread crates/bevy_solari/src/realtime/restir.wgsl
Comment thread crates/bevy_solari/src/realtime/restir.wgsl
Comment thread crates/bevy_solari/src/realtime/realtime_bindings.wgsl
Comment thread crates/bevy_solari/src/realtime/restir.wgsl
Comment thread crates/bevy_solari/src/realtime/restir.wgsl
Comment thread crates/bevy_solari/src/realtime/restir.wgsl
Comment thread crates/bevy_solari/src/realtime/restir.wgsl
Comment thread crates/bevy_solari/src/realtime/initial_path.wgsl
@JMS55 JMS55 marked this pull request as draft July 5, 2026 21:11
@JMS55 JMS55 marked this pull request as ready for review July 6, 2026 03:20
@alice-i-cecile alice-i-cecile added the M-Release-Note Work that should be called out in the blog due to impact label Jul 6, 2026
@github-actions

github-actions Bot commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

It looks like your PR has been selected for a highlight in the next release blog post, but you didn't provide a release note.

Please review the instructions for writing release notes, then expand or revise the content in the release notes directory to showcase your changes.

@alice-i-cecile

Copy link
Copy Markdown
Member

This is a good candidate for a dedicated release note. Feel free to just copy-paste the stuff from your PR description as the stub if you'd like :)

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-Refinement Improves output quality, without fixing a clear bug or adding new functionality. D-Complex Quite challenging from either a design or technical perspective. Ask for help! M-Release-Note Work that should be called out in the blog due to impact 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.

5 participants