Update random seeds on every bounce #2
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi Sam,
Everything works great, but when the camera is in motion, there are rendering artifacts due to the stale nature of the random seeds on every ray bounce. This PR alleviates that by randomly adding to the seeds themselves on every bounce.
Now when the camera is in motion, the noise/variance has no distracting patterns and has a gentle soft motion (at least on my laptop, needs to be verified across other devices). I tried many different updating strategies but this one seems to perform the best so far. It might be the case that there are better updating algorithms out there for randomness in OpenCL, but this should be operable in the meantime.
Thanks again for your posts!
-Erich
P.S. I can go from 4 samples (your default) down to 2 samples and the noise still looks good. At 1 sample however, the curtains are pulled back and the math/sin nature of the noise is revealed. For raw performance reasons, I might need my apps to run at 1 sample per pixel, so in the future I'll see if there are any magic bullets for this noise pattern issue. Please let me know if you've seen some other solutions out there.