-
Notifications
You must be signed in to change notification settings - Fork 48
Multibounce + reflection "debug" view in path-tracer #31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
stan4dbunny
wants to merge
38
commits into
GPUOpen-LibrariesAndSDKs:master
Choose a base branch
from
stan4dbunny:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
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
…d sets f0 to max for reference pt
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.
Hi! Erica here:)
I've created a toggle in GI-1.1 for a completed multibounce feature!
Singlebounce with temporal radiance feedback.
Multibounce without temporal radiance feedback.
Multibounce
The general idea with multibounce is to extend the ray-path by adding another bounce. The
first bounce cells (the hash grid cells created by the screen probes) will trace rays and create second bounce cells at the hit point. The first bounce cells will then additionally to doing a direct light evaluation, also get the contribution from the second bounce cell, thereby improving the bounce lighting. The contribution from the second bounce cells becomes the
indirect light for the first bounce cells.
The amount of direct light samples and indirect light samples for a cell might be different, and because they are sampled independently we can divide them up into two Monte Carlo estimators and add these together. Because these estimators are estimated over time, we have to have two separate buffers, one for direct and one for indirect light, for each first bounce cell, compared to just the one buffer in singlebounce. There might be ways to minimize the memory stored, but this has not been looked into.
The same visisibilitycellbuffer and visibilityquerybuffer are used, but the multibounce entries come after all the singlebounce (first bounce cell and screen probe) entries.
I've concluded that you don't want to combine multibounce and the normal temporal radiance feedback feature, but there was one scene where it seemed to improve the render.
Singlebounce + temporal radiance feedback.
Multibounce + normal temporal radiance feedback.
The sections that have been changed.
Steps
Creating second bounce cells
Generate reservoirs
Generate multibounce reservoirs
Update tiles
Resolving second bounce cells into first bounce cells
Resolving first bounce cells into second bounce cells
Notes
I haven't completely fixed the debug hash grid cell view, because I wasn't sure if there should be for example two separate "filtered gain" views for direct and indirect.
Also, I only fixed multibounce for in-line ray-tracing.
I haven't really optimized anything. Currently, with multibounce, the frame time for GI-1.1 increases (up to 1ms), but there is at least one thing that can be optimized. For example, right now the brdf is evaluated in GenerateReservoirs and again in PopulateMultibounceCells, and sent with the pdf as a float4, as a parameter to PopulateMultibounceCellsTraceRay but it's only used if the ray hits something.
It also seems as if UpdateTiles takes considerable longer now, probably because I added the filtering for the indirect radiance as well, so maybe this could be optimized somehow.
Debug reflection view in PT
Because I wanted to make sure the reflections were correct in multibounce, I tried to recreated the debug reflection view that existed in GI-1.1.
Singlebounce in reflection view.
Multibounce in reflection view.
The path-tracer in reflection view.
I'm not sure if this view works for all settings of the path-tracer, but it works for the default settings at least.
Also
Added support for png screenshots.
Final notes
I'm almost done with my thesis report, so I thought I would maybe link it here when I'm done in case anyone wants to read more, but let me know if anything should be clarified!