Skip to content

Transparent QoL part 1 - Refract & FresnelEquation Node #6466

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

Merged
merged 51 commits into from
Jan 11, 2022

Conversation

skhiat
Copy link
Contributor

@skhiat skhiat commented Dec 2, 2021

Note: already reviewed [PR - splitting ShaderGraph only code]

Transparent Quality Of Life (part 1)

  • RefractNode:
    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:
    image
    Otherwise:
    Air-glass interaction:
    image

Note: the parameter incident is a vector which is from "source-to-surface" (for instance from eye-to-pixel):
image

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.

Fresnel node:
image
Note: already reviewed [PR - splitting ShaderGraph only code]

Add Scene Depth Difference for 3 format: {Linear01, Raw, Eye}:
image

UX review notes: changes the order of parameters

https://jira.unity3d.com/browse/HDRP-1600
https://jira.unity3d.com/browse/HDRP-1602
https://jira.unity3d.com/browse/HDRP-1603

ref:
#6201

https://jira.unity3d.com/browse/HDRP-1599

ref:
#6032

@skhiat skhiat requested review from a team and kecho December 2, 2021 19:58
@skhiat skhiat marked this pull request as ready for review December 3, 2021 00:34
@skhiat skhiat requested a review from alelievr December 3, 2021 12:44
@skhiat skhiat changed the title transparent QoL part 1 - Refract & FresnelEquation Node [DeadSoon] transparent QoL part 1 - Refract & FresnelEquation Node Dec 3, 2021
@skhiat skhiat changed the title [DeadSoon] transparent QoL part 1 - Refract & FresnelEquation Node Transparent QoL part 1 - Refract & FresnelEquation Node Dec 5, 2021
Copy link
Contributor

@kecho kecho left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved: just make sure you move the docs to the hdrp package for hdrp specific nodes

@skhiat skhiat requested a review from Vic-Cooper December 9, 2021 14:11
Copy link
Contributor

@Vic-Cooper Vic-Cooper left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Modified docs.

Copy link
Contributor

@esmelusina esmelusina left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As mentioned in Slack, We are holding off reviewing new feature requests until Jan at the earliest. We'll want a design and product review before we consider the PR.

…shadergraph/transparent-qol_part_1

# Conflicts:
#	com.unity.render-pipelines.high-definition/CHANGELOG.md
@kecho kecho merged commit cfd0466 into master Jan 11, 2022
@kecho kecho deleted the shadergraph/transparent-qol_part_1 branch January 11, 2022 18:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants