-
Notifications
You must be signed in to change notification settings - Fork 855
[HDRP][SSR-RTR] Fallback mode for ray miss and various bugfixes. #4968
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
Closed
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
… coatmask usage consistency between forward and deferred.
… non lerped light sampling parameters formulation (here fed from normaldata) but lerped both FGD and reflectionHierarchyWeight headroom left with coatmask.
…ing just ignores SSR-RTR light as coatMask goes to 0.
-Fix indirect light hitting StackLit materials having wrong color for indirect ambient illumination. -Fix indirect light hitting StackLit materials not showing any specular response.
…aterials. This will only show with multi bounce indirect (so with RTR quality mode with a bounce count >= 2). -Make Lit secondary reflections also consider coat like StackLit and AxF -Fix Lit, AxF, StackLit: to use proper specular BSDF lobe sampling when a coat is present.
-RaytracingLightLoop EvaluateBSDF_RaytracedReflection() material callback now allow reflectionHierarchyWeight to be modified. This allows secondary reflections to properly deal with coated materials similarly to what the analogous EvaluateBSDF_ScreenSpaceReflection() callbacks (of the main lighting LightLoop) already can do, by using a (possibly integrated) Fresnel term to modulate it. See for example LitRaytracing.hlsl. -Both light loops now also have an opt-in (no performance hit - this is pruned by the compiler) mechanism to allow more refined reflection light hierarchies for coated/layered BSDF materials: a single reflectionHierarchyWeight is still used by the light loops, but a material can internally track the other layer weight and return eg a minimum through the main reflectionHierarchyWeight to the ligjht loop. This has many benefits: -Prevent overbright doubling of fresnel intensity for coat when using SSR-RTR lighting as there's now a way for the material to properly track the SSR-RTR contribution outside of its wanted lightprobe fallback (for performance reasons with SSR-RTR we can only sample one lobe roughness and direction) -For materials that can have different lobe directions, it allows the indirect specular lighting callbacks (ie EvaluateBSDF_Env() ) to allow further lightprobe evaluations when even one of the lobes have a fully used hierarchy. This can prevent subtle reflection artifacts for non trivial light probes setups with materials with different lobe directions.
…ection position calculations. -In the deferred reflection lighting compute, a subtle issue existed where the depth loaded in half res was not necessarily the same as in every other passes eg for the ray launch contrary to the comments (RaytracingReflections.compute to generate directions, RaytracingGBuffer.raytrace for the raygen, RaytracingReflectionFilter.compute for the light weights and upscale) -Also add defines for magic values in ray intersection distance buffer -Add some notes about early out conditions
… for the denoiser logic. Also fix uninitialized deferred (performance) light reflections adjustweight kernel (it was kernel # 0 so it worked). -The coatmask was ignored in the denoiser, which made the base smoothness affect the denoising of the raytraced coat reflections -fix uninitialized deferred (performance mode) light reflections adjustweight kernel (it was kernel # 0 so it worked). -In quality mode, also add internally an option to consider AffectSmoothSurfaces accumulation flag to escape sampling in the ray dispatch if we're going to use a single sample and skip the temporal accumulation later
…ways use the pre-integrated probes or sky even with raytraced reflections.
…riables are corrupted (eg _RayTracingFallbackHierarchy). Seems to happen under certain scene config (seems more repeatable with 0503d1f)
slunity
added a commit
that referenced
this pull request
Oct 21, 2021
…te weight for coat and base lobe to correctly fallback from SSR light to light reflection probes and also implement the same coat-traced light "reuse" as Lit for bottom lobe when roughnesses are similar. This also cleans up the overlapping contributing reflection probes / dual normal setup problem in EvaluateBSDF_Env(). Based on previously discussed #4968.
slunity
added a commit
that referenced
this pull request
Oct 21, 2021
Add support for more refined reflection hierarchy for SSR-RTR blending with IBL and to avoid double coat lighting. This is mainly based on #4968, but with the added feature to re-use the coat-traced light for similarly-rough bottom layer lobes, like done for Lit. This fixes several issues in the implementation in StackLit since #5565: -Similar issues fixed for Lit (see other PR for Lit) -StackLit can have a rough coat, but an arbitrary 0.9 smoothness value was used to decide if the coat-traced light would be re-used for the bottom lobes. -The wrong bottom lobe roughnesses were used (values that don't include the effect of BRDF vertical layering computations) -StackLit can have different lobe directions and the light hierarchy now account for this.
This was referenced Oct 21, 2021
sebastienlagarde
added a commit
that referenced
this pull request
Nov 22, 2021
Add support for more refined reflection hierarchy for SSR-RTR blending with IBL and to avoid double coat lighting. This is mainly based on #4968, but with the added feature to re-use the coat-traced light for similarly-rough bottom layer lobes, like done for Lit. This fixes several issues in the implementation in StackLit since #5565: -Similar issues fixed for Lit (see other PR for Lit) -StackLit can have a rough coat, but an arbitrary 0.9 smoothness value was used to decide if the coat-traced light would be re-used for the bottom lobes. -The wrong bottom lobe roughnesses were used (values that don't include the effect of BRDF vertical layering computations) -StackLit can have different lobe directions and the light hierarchy now account for this. Co-authored-by: sebastienlagarde <sebastien@unity3d.com>
sebastienlagarde
pushed a commit
that referenced
this pull request
Nov 22, 2021
…te weight for coat and base lobe to correctly fallback from SSR light to light reflection probes and also implement the same coat-traced light "reuse" as Lit for bottom lobe when roughnesses are similar. (#6108) This also cleans up the overlapping contributing reflection probes / dual normal setup problem in EvaluateBSDF_Env(). Based on previously discussed #4968.
sebastienlagarde
pushed a commit
that referenced
this pull request
Dec 8, 2021
…te weight for coat and base lobe to correctly fallback from SSR light to light reflection probes and also implement the same coat-traced light "reuse" as Lit for bottom lobe when roughnesses are similar. (#6108) This also cleans up the overlapping contributing reflection probes / dual normal setup problem in EvaluateBSDF_Env(). Based on previously discussed #4968.
sebastienlagarde
added a commit
that referenced
this pull request
Dec 8, 2021
* Fixed references to probes not cleared when unloading a scene #5945 * [Fogbugz # 1365368] Fixing debug views for drs #5948 * [HDRP] Stacklit RTR: Fix issues with RTR reflections from stacklit materials #6103 * [HDRP] Lit coat ssr-rtr: Fix various issues with using SSR lighting with IBL fallback (case 1380351) #6106 * [HDRP] StackLit coat ssr-rtr light hierarchy and IBL fallback fixes. #6107 * AxF ssr-rtr: Implement refined light reflection hierarchy with separate weight for coat and base lobe to correctly fallback from SSR light to light reflection probes and also implement the same coat-traced light "reuse" as Lit for bottom lobe when roughnesses are similar. (#6108) This also cleans up the overlapping contributing reflection probes / dual normal setup problem in EvaluateBSDF_Env(). Based on previously discussed #4968. * Fix issue with reflection probe normalization via APV (#6140) * fix issue * - * [not ready] HDRP Scene Template: Bumped up IET framework version to 2.1 and better default layout for 1080p monitors (#6153) * bumped up iet framework to 2.1, created new 1080p and 4k friendly layout * Merge branch 'master' into hdrp-template-bumpup-iet-framework-version Co-authored-by: sebastienlagarde <sebastien@unity3d.com> * [HDRP] Fix custom pass utils in XR #6271 * Update reference screenshots Co-authored-by: Adrien de Tocqueville <adrien.tocqueville@unity3d.com> Co-authored-by: Kleber Garcia <kleber.garcia@unity3d.com> Co-authored-by: slunity <37302815+slunity@users.noreply.github.com> Co-authored-by: FrancescoC-unity <43168857+FrancescoC-unity@users.noreply.github.com> Co-authored-by: pierre-unity <39901544+pierre-unity@users.noreply.github.com> Co-authored-by: Antoine Lelievre <antoinel@unity3d.com>
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.
Please read the Contributing guide before making a PR.
Checklist for PR maker
need-backport-*
label. After you backport the PR, the label changes tobackported-*
.CHANGELOG.md
file.Purpose of this PR
Why is this PR needed, what hard problem is it solving/fixing?
Wip: this can be split in multiple PRs.
Essentially bugfixes for raytracing reflections, and a fallback mode for ray misses.
Testing status
Describe what manual/automated tests were performed for this PR
Comments to reviewers
Notes for the reviewers you have assigned.