Solari realtime lighting ~16% darker than Pathtracer under a large textured emissive mesh

Open
#26,610 1 comment 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 2 days

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
42/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
rust

Research direction

Start by reducing the reported scene to a plane under a textured emissive dome, then compare SolariLighting and Pathtracer with the same setup. The issue points to generate_nee_candidate, generate_emissive_candidate, and reservoir_contribution as relevant shader entry points; read those paths alongside the emissive mesh sampling code. Done means identifying and reproducing the source of the roughly 16% radiance gap, with a regression case showing the estimates agree.

Written by the indexing model from the issue text.

Description

Bevy version

0.20.1 (bevy_solari 0.20.1), Vulkan, NVIDIA L4 (driver 580), Ubuntu 24.04.

What I did

A static scene: a small block of street (cobblestones, kerbs, walls; StandardMaterial with base colour, normal and metallic-roughness textures, no vertex colours) enclosed by an emissive sphere, 40 m in radius, 9 216 triangles, normals facing inwards, base_color black, emissive = 39 322 × an emissive_texture (Rgba16Float, 1024 × 512, equirectangular: the light seen from the middle of the block). The sphere is the only light source; the camera's EnvironmentMapLight is present, but every ray meets the sphere first (it lies within world_cache_max_gi_ray_distance).

The camera does not move. After 6 s, I compare the mean linear radiance over the floor's pixels (diffuse-dominated cobblestones), drawn with Tonemapping::None (nothing clipped), between:

  • Pathtracer (about 1 200 samples a pixel accumulated): the reference;
  • SolariLighting { restir: true, ..default() }, raw (no denoiser of any kind).

What I saw

Setting Floor, relative to Pathtracer
default, restir: true 0.84
confidence_weight_cap: 1.0 ≈ same (< 1 % change)
primary_di_samples: 32, secondary_di_samples: 16 ≈ same
max_bounces: 8 ≈ same
world_cache_position_base_cell_size: 0.05 ≈ same
restir: false darker still

(The settings rows were measured through our own temporal/à-trous denoiser, which raises the mean by about 9 %; their differences relative to the default are what matters.)

What I expected

The realtime estimate to converge, on average, to the Pathtracer's, at least for a static camera and a static, diffuse-lit scene. The gap is the same over the whole floor (not localised near edges or occluders), and none of the exposed settings moves it.

Notes

  • Reading the shaders, NEE and BRDF-sampled emissive hits use consistent MIS weights (generate_nee_candidate / generate_emissive_candidate / reservoir_contribution), and pack_resolved_light_sample's log2 + RGB9E5 encoding is not clipping here. I could not find the cause by reading.
  • The light source is one emissive mesh of 9 216 triangles with a textured emission (bright sky directions next to dark façades). I have not yet reduced this to a minimal scene; a plane under a textured emissive dome is my best guess at one. Happy to try one if useful.
Dominant language
Rust
Stars
49.8k
Forks
5.1k
Avg merge
3d 4h
Merged PRs (30d)
136

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from bevyengine/bevy

All issues in bevyengine/bevy

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.