浏览代码

Note a pleasant hack for iridescence in the case of TIR.

/main
Stephane Laroche 6 年前
当前提交
1c07ab20
共有 1 个文件被更改,包括 2 次插入0 次删除
  1. 2
      com.unity.render-pipelines.core/CoreRP/ShaderLibrary/BSDF.hlsl

2
com.unity.render-pipelines.core/CoreRP/ShaderLibrary/BSDF.hlsl


#ifdef UNITY_MATERIAL_STACKLIT
//TIR
if( sinTheta2 > 1.0 ) return real3(1.0, 1.0, 1.0);
//Or use this "artistic hack" to get more continuity even though wrong (test with dual normal maps to understand the difference)
//if( sinTheta2 > 1.0 ) { sinTheta2 = 2 - sinTheta2; }
#endif
real cosTheta2 = sqrt(1.0 - sinTheta2);

正在加载...
取消
保存