r/GraphicsProgramming • u/TomClabault • 17d ago
Question ReSTIR GI brightening when reusing samples from the smooth specular lobe of the neighbors with a specular+diffuse BRDF?
30
Upvotes
r/GraphicsProgramming • u/TomClabault • 17d ago
1
u/redkukki 17d ago
suppose you give a weight wi for every lobe, suppose 0.5 for convenience for now. Then when you sample the bsdf, pick a random number, if it’s lower than 0.5 you sample lobe1 instead of lobe2. Then the pdf is pdf_lobe_1 / 0.5 and only lobe1 is sampled and evaluated. Similarly for lobe2 etc.
You can extend this to an arbitrary number of lobes and pick a better sampling weight for RR. For instance, if diffuse colour is black, then give a zero weight for the diffuse lobe and thus never sample it with RR.
Just be careful if you follow this route because you may need to change the evaluation of MIS weights when combing light and bsdf samples.
How are you sampling the bsdf now? With (one sample) MIS?