Gamma correction, quadratic light falloff, and randomness improvements.#1
Open
jonathanolson wants to merge 1 commit intoevanw:masterfrom
Open
Gamma correction, quadratic light falloff, and randomness improvements.#1jonathanolson wants to merge 1 commit intoevanw:masterfrom
jonathanolson wants to merge 1 commit intoevanw:masterfrom
Conversation
Adding gamma correction so that samples are blended linearly and then displayed for more accurate colors (adjusted colors to match current behavior). Added quadratic light falloff for realism (a light next to a colored wall will now correctly light the area more with that color). Improved random sampling to minimize banding behavior and prevent artifacts from rendering after it's been left open for a few days.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Hello,
I saw your impressive demo and skimmed the code (I'm working on a 4D raytracing / global illumination personal project using a similar structure) and noticed a few improvements to make the rendered output more realistic. Please ignore this if they were creative liberties to achieve the current rendering!
First thing I noticed was the light falloff (putting the light next to a colored surface didn't impart more of that color to the box), and after that gamma correction was needed so samples could be blended linearly and map approximately to sRGB (I'm ignoring the sRGB details for dark colors that don't follow the power curve).
Additionally, it seemed to have a bit of banding in the noise on my GPU, and after leaving it open for a few days the large timeSinceStart caused rounding issues in the sin-random approximation seen here:

The area around the light generally saturates fairly easily, and the falloff when the light sample box is placed near a surface causes some bounces to have an extremely high contribution to the image creating significant variance and slower convergence in those cases. Putting a ceiling on the contribution of a sample would fix that, but would introduce bias, so I didn't do that.