浏览代码

Saturate dot product result in fresnel effect node to avoid negative values

/main
Peter Bay Bastian 7 年前
当前提交
c0c7450c
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 2
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/Nodes/Math/Vector/FresnelEffectNode.cs

2
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/Nodes/Math/Vector/FresnelEffectNode.cs


return
@"
{
Out = pow((1.0 - dot (normalize (Normal), normalize (ViewDir))), Power);
Out = pow((1.0 - saturate(dot(normalize(Normal), normalize(ViewDir)))), Power);
}
";
}
正在加载...
取消
保存