Insights into random number generator

Questions, suggestions, use cases, announcements related to Lighthouse 2.
Post Reply
papaboo
Posts: 45
Joined: Fri Jun 21, 2013 10:02 am
Contact:

Insights into random number generator

Post by papaboo » Sat Sep 14, 2019 11:17 am

Could you elaborate a bit on the RNG used?

In preperation for denoising in my own renderer I'm looking into different random number generators to get a decent set of samples pr pixel and ideally different samples for neighbouring pixels. I see that yours uses what looks like several sets of blue noise samples credited to Heitz and then some magic(tm) hashing. Is there any rational behind the specific hash functions?

Cheers

jbikker
Posts: 222
Joined: Mon Nov 28, 2011 8:18 am
Contact:

Re: Insights into random number generator

Post by jbikker » Sat Sep 14, 2019 5:34 pm

Hello,

The blue noise is directly used from Heitz:

https://eheitzresearch.wordpress.com/762-2/

In coresettings.h you will find the data distributed by Heitz, stored as 64-bit hexadecimal numbers.

Once the renderer runs out of blue noise samples it switches to Marsaglia's xor32 RNG, seeded with the thread number scrambled by a WangHash.

- Jacco.

papaboo
Posts: 45
Joined: Fri Jun 21, 2013 10:02 am
Contact:

Re: Insights into random number generator

Post by papaboo » Tue Sep 17, 2019 4:20 am

Fantastic, then I have an idea about what to expect from it.

And thanks for opening up your renderer.

Post Reply