Skip to content

[ShaderGraph] FresnelEquation & Refract Nodes back to ShaderGraph package #6924

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

Draft
wants to merge 9 commits into
base: master
Choose a base branch
from

Conversation

skhiat
Copy link
Contributor

@skhiat skhiat commented Feb 1, 2022

Bring back FresnelEquation and Refract Nodes to ShaderGraph.

@github-actions
Copy link

github-actions bot commented Feb 1, 2022

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.
Link to Yamato: https://unity-ci.cds.internal.unity3d.com/project/902/
Search for your PR branch using the search bar at the top, then add the following segment(s) to the end of the URL (you may need multiple tabs depending on how many packages you change)

HDRP
/jobDefinition/.yamato%2Fall-hdrp.yml%23PR_HDRP_trunk
With changes to HDRP packages, you should also run
/jobDefinition/.yamato%2Fall-lightmapping.yml%23PR_Lightmapping_trunk

Shader Graph
/jobDefinition/.yamato%252Fall-shadergraph.yml%2523PR_ShaderGraph_trunk
Depending on your PR, you may also want
/jobDefinition/.yamato%252Fall-shadergraph_builtin_foundation.yml%2523PR_ShaderGraph_BuiltIn_Foundation_trunk
/jobDefinition/.yamato%252Fall-shadergraph_builtin_lighting.yml%2523PR_ShaderGraph_BuiltIn_Lighting_trunk

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.

@@ -27,13 +25,13 @@ class HDFresnelEquationNode : AbstractMaterialNode

const string kDotVectorsInputSlotName = "Dot Vector";
const string kF0InputSlotName = "F0";
Copy link
Contributor

Choose a reason for hiding this comment

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

Please rename the F0 input port to Reflectance.

@@ -38,7 +36,7 @@ class HDRefractNode : AbstractMaterialNode
const int kIntensityOutputSlotId = 5;
Copy link
Contributor

Choose a reason for hiding this comment

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

Please rename IORSource input port to From Refractive Index and IORMedium input port to To Refractive Index so that we stay consistent with the changes made to the Fresnel Equation input ports.

@@ -27,13 +25,13 @@ class HDFresnelEquationNode : AbstractMaterialNode

const string kDotVectorsInputSlotName = "Dot Vector";
Copy link
Contributor

@bencloward bencloward Feb 18, 2022

Choose a reason for hiding this comment

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

Please replace the Dot Vector input port with an Incident and Normal port (consistent with the Refract node) and do the dot product operation internally. Please make the default of the Normal port use the world space normal, and make the Incident input port use the World Space view direction as default. - the same as the current Fresnel Effect node.

@@ -38,7 +36,7 @@ class HDRefractNode : AbstractMaterialNode
const int kIntensityOutputSlotId = 5;
Copy link
Contributor

Choose a reason for hiding this comment

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

Please make the Normal input port default to using the World Space vertex Normal, like the Fresnel Effect node currently does. And make the Incident input port default to using the world space view direction.

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.

3 participants