MilchRatchet / Luminary

CUDA based Pathtracing Offline and Realtime Renderer
MIT License
30 stars 1 forks source link

New uniform random number generator #76

Closed MilchRatchet closed 1 year ago

MilchRatchet commented 2 years ago

For any instance where we don't need/want blue noise we use curand's XORWOW random number generator. Now while curand likes to claim that they are fast, a XORWOW state struct is 44 bytes in size. This is very impractical for memory performance. In turn I have now encountered multiple occasions where it was beneficial to replace calls to that one with xorshift. At the end of the day it will probably be best to introduce a custom random number generator that takes up 4 or 8 bytes at most so that the state fits into register space without any issues.