-
Notifications
You must be signed in to change notification settings - Fork 839
[DeadSoon] Transparent QoF (part 1): RefractNode and Default DistortionBlur to 0 #6032
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
…HDRP/transparent_quality_of_life
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 Shader Graph SRP Core 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. |
com.unity.render-pipelines.high-definition/Editor/Material/ShaderGraph/HDBlockFields.cs
Show resolved
Hide resolved
com.unity.shadergraph/Editor/Data/Nodes/Math/Advanced/RefractNode.cs
Outdated
Show resolved
Hide resolved
This reverts commit 38fd991.
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.
Please address these comments before final submission. Feel free to reach out to me on Slack @sarah.welton to discuss :)
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.
If I've mis-stated anything in the text I've provided, please let me know - otherwise, please make the requested changes :) Thank you!
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.
Looks good - thanks for making this!
Looks like this PR was refactored to be HDRP only and merged, and this new one will move it into ShaderGraph proper: #6924. As there is now a replacement PR, I'm going to go ahead and close this. |
Transparent Quality Of Life (part 1)
Parametrize with eta which is the ratio of both IOR (Index Of Refraction) from incoming_medium (n_i) and outgoing_medium (n_o) eta == n_i/n_i. For instance from Air to Glass that would be 1.0/1.3333.
If it's air-to-air interaction eta == 1:
Otherwise:
Air-glass interaction:
Note: the parameter incident is a vector which is from "source-to-surface" (for instance from eye-to-pixel):

We have 2 mode:
Safe: Protect against NaN when a sqrt of a negative number which happen when we have glass-air interaction, at a specific angle we have no refraction but pure reflection which should be handle by Fresnel.
CriticalAngle: Not protected the user should care of the negative case.
Default DistortionBlur to 0:
Double check:
"Check what's is happening with existing project, does it change their value as well"
https://jira.unity3d.com/browse/HDRP-1599