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
Improve Screen Space Refraction Default Behavior #6316
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.
I'm still not sure how I feel about the 10 meter default, would it make sense the default proxy to be on the screen space refraction volume component?
I personally would want that. As stated on the internal discussion, The 10m radius sphere could be the new default but access to this proxy to revert to the previous behavior and/or change the radius could be interesting in some setup. Even though, the workaround is simple, is adding your own proxy but still, having it exposed might be a bit less confusing to the user where this projection comes from instead of it being hidden/hardcoded.
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.
I've suggested tiny phrasing changes.
com.unity.render-pipelines.high-definition/Documentation~/Refraction-in-HDRP.md
Outdated
Show resolved
Hide resolved
Putting this PR on temporary hold as we revise our plan for the proxy volume - we plan to add the bounding box for transparent objects which will provide a much better default behavior. |
This PR is dependent on this Ono PR and should not land before it: https://ono.unity3d.com/unity/unity/pull-request/138270 |
@johnpars can you merge master? there is conflcit. thanks |
…not overlap the other object)
…hics into HDRP/fix-1379733
I'm wondering if we should remove the set proxy volume by default now. (Sorry I know it has been changed back and forth). |
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.
Love this change. 👍
It gives you out of the box box (yes, two times) refraction as you'd expect it to work.
I personally like having the use influence volume as proxy volume checked by default.
This will ensure that if a user wants infinite projection it has to do something to have it, uncheck this or select infinite in the proxy set.
As Alix said, the only thing I'd like changed on my side would be to have proper tooltips (they are missing) on the proxy volume to explain a bit that this volume will change the way refraction and reflection is done in screen space.. etc
Also, the PR could be updated with the correct new behavior :)
Will incorporate this feedback (PR updated as well, sorry about that). Right now I am also fighting Yamato, which seems to be imploding for this branch. |
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.
Tested again with more complex geometry and comparing with the pathtracer results for refraction as a reference.
I still think this is a huge improvement to use the bounding box by default and gives relatively good results without having to setup anything. The reflection probe + proxy still gives you the possibility to adjust the refraction shape for more complex scenarios.
Still need to add the tooltips but I'm still approving. ✔️
Yamato is still failing, investigating again the cause. |
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.
Further small language suggestions.
com.unity.render-pipelines.high-definition/Documentation~/Refraction-in-HDRP.md
Outdated
Show resolved
Hide resolved
com.unity.render-pipelines.high-definition/Documentation~/Upgrading-from-2022.1-to-2022.2.md
Outdated
Show resolved
Hide resolved
com.unity.render-pipelines.high-definition/Documentation~/Upgrading-from-2022.1-to-2022.2.md
Outdated
Show resolved
Hide resolved
com.unity.render-pipelines.high-definition/Documentation~/Upgrading-from-2022.1-to-2022.2.md
Outdated
Show resolved
Hide resolved
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.
Docs changed approved.
Purpose of this PR
Address https://fogbugz.unity3d.com/f/cases/1379733/
This PR changes the default behavior of screen space refraction when there is no reflection probe present.
Before, the behavior was to configure an infinite projection on-the-fly. With this PR, it will instead default to the renderer's bounding box to be used as the refraction proxy.
The result of this change is that a user will now get a meaningful default result for a material configured with a box refraction model (image below).
Left, Box Refraction Mode + Infinite Projection (Before)
Right, Box Refraction Mode + Bounding Box Projection (After)
Testing status
Comments to reviewers
I didn't think a backport was necessary as it is more of a change to a working behavior, rather than a bug fix.