浏览代码

Fix Light Probe node

- Update function to latest SRP library
- Add missing function for preview rendering
/main
Matt Dean 7 年前
当前提交
a0875348
共有 2 个文件被更改,包括 16 次插入1 次删除
  1. 2
      com.unity.shadergraph/Editor/Data/Nodes/Input/Scene/LightProbeNode.cs
  2. 15
      com.unity.shadergraph/ShaderGraphLibrary/ShaderVariablesFunctions.hlsl

2
com.unity.shadergraph/Editor/Data/Nodes/Input/Scene/LightProbeNode.cs


return
@"
{
Out = ShadeSH9(float4(Normal , 1));
Out = SampleSH(Normal);
}
";
}

15
com.unity.shadergraph/ShaderGraphLibrary/ShaderVariablesFunctions.hlsl


#define UNITY_Z_0_FAR_FROM_CLIPSPACE(coord) (coord)
#endif
half3 SampleSH(half3 normalWS)
{
// LPPV is not supported in Ligthweight Pipeline
real4 SHCoefficients[7];
SHCoefficients[0] = unity_SHAr;
SHCoefficients[1] = unity_SHAg;
SHCoefficients[2] = unity_SHAb;
SHCoefficients[3] = unity_SHBr;
SHCoefficients[4] = unity_SHBg;
SHCoefficients[5] = unity_SHBb;
SHCoefficients[6] = unity_SHC;
return max(half3(0, 0, 0), SampleSH9(SHCoefficients, normalWS));
}
#endif // UNITY_SHADER_VARIABLES_FUNCTIONS_INCLUDED
正在加载...
取消
保存