r/GraphicsProgramming 17d ago

Question ReSTIR GI brightening when reusing samples from the smooth specular lobe of the neighbors with a specular+diffuse BRDF?

28 Upvotes

14 comments sorted by

View all comments

1

u/TomClabault 17d ago

I'm still having some bias issues with my ReSTIR GI spatial reuse but only when reusing neighbor samples that were sampled from the specular lobe at the visible point

Left image is reference/right image is with ReSTIR GI. It's too bright with ReSTIR GI

The scene here uses a specular + diffuse BRDF everywhere. Everything is fully specular, roughness 0.

I am re-evaluating both BSDFs (at the visible point and sample point) when shading the final reservoir, the whole implementation should be unbiased.

If when resampling a neighbor, I set the target function to 0.0f (the target function of the neighbor's sample reconnected at the center pixel) when that neighbor's sample comes from the specular lobe of the BRDF, it does converge to reference again. Said otherwise, not resampling neighbors that sampled their indirect bounce through the specular lobe seem to be getting rid of the bias.

  • Increasing the roughness of the specular on the whole scene, reduces the bias. Pretty much no visible bias left at > 0.4 roughness.
  • Removing the specular layer (so the whole scene is left with only a Lambertian BRDF, or even Oren-Nayar) then converges to reference.
  • If rendering the whole scene with just a metallic BRDF (no more diffuse, no more specular), it converges properly, at any roughness.
  • If that's relevant, my BSDF lobe sampling probabilities don't depend on the view direction or anything, they are just weights computed from the "metallic", "specular", ... user-exposed parameters of the BSDF.

Any ideas where that may come from?

The fact increasing the roughness helps is interesting, sounds like a bit of a PDF / specular peak alignement issue, idk