-
Notifications
You must be signed in to change notification settings - Fork 850
[HDRP] Improves robustness of detail normal mapping when scale = 0 (and not using surface gradients) #6980
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
Conversation
Hi! This comment will help you figure out which jobs to run before merging your PR. The suggestions are dynamic based on what files you have changed. HDRP Depending on the scope of your PR, you may need to run more jobs than what has been suggested. Please speak to your lead or a Graphics SDET (#devs-graphics-automation) if you are unsure. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
While this is still a slight improvement for the case where the detail map scale is zero , I don't really think this fixes the issue overall because on some cases when having both normal and detail map, it's still enough for some reasons to flip the normal onto the other hemisphere :| 83cf4d2f75325902a8c6dcf9bd9e1c80.mp4I don't know if we can do anything about it while keeping the function (UnpackNormalAG) that infer the Z coordinate of the normal from the XY but wanted to highlight that ! |
any update? |
discussed with Remi, we will merge the PR, waiting for Yamato |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The fix is still an improvement so we will merge.
While this does not really fully fix the problem, it has been decided to discuss and maybe find a way to use surface gradient in the future rather than trying to fix the way normal map are blended right now.
…nd not using surface gradients) #6980
* Improve Path tracing docs #6494 * [HDRP] Improves robustness of detail normal mapping when scale = 0 (and not using surface gradients) #6980 * Add pragma renderer only for planar reflection preview shader (#7058) * Add pragma renderer only for planar reflection preview shader * various missing part * Fix wrong class name in the CustomPassUtils doc (#7063) * Fix null check reference in CollectLightsForRayTracing (Fix 1398381) #7065 * Fixed camera motion vector pass reading last frame depth texture #7111 * Update Custom-Pass-Injection-Points.md (#7116) * Update Custom-Pass-Injection-Points.md (#7116) * Fix lunix compil issues (#7143) * note bolding (#7161) * note bolding * Apply formatting changes * Update blit-overview.md * Update blit-overview.md * Update blit-overview.md * Update blit-overview.md * Update blit-overview.md * Update blit-overview.md Co-authored-by: noreply@unity3d.com <noreply@unity3d.com> Co-authored-by: sebastienlagarde <sebastien@unity3d.com> * updated screenshots (#7164) * updated screenshots * Apply formatting changes Co-authored-by: noreply@unity3d.com <noreply@unity3d.com> Co-authored-by: Vic Cooper <63712500+Vic-Cooper@users.noreply.github.com> Co-authored-by: Emmanuel Turquin <emmanuel@turquin.org> Co-authored-by: Antoine Lelievre <antoinel@unity3d.com> Co-authored-by: JulienIgnace-Unity <julien@unity3d.com> Co-authored-by: emilybrown1 <88374601+emilybrown1@users.noreply.github.com> Co-authored-by: noreply@unity3d.com <noreply@unity3d.com>
This PR addresses: https://fogbugz.unity3d.com/f/cases/1399548/
Before:
Using some detail maps with null scale resulted in null normals.
Now:
Null scale will produce a "neutral" normal, as expected.
Note:
We could consider normalizing the detailNormal in a more general way, rather than in this specific use-case, but I went for the minimal amount of changes and risks of unwanted side-effects.