浏览代码

Add full fresnel dieletric

/main
Sebastien Lagarde 7 年前
当前提交
eabec798
共有 1 个文件被更改,包括 8 次插入0 次删除
  1. 8
      ScriptableRenderPipeline/Core/CoreRP/ShaderLibrary/BSDF.hlsl

8
ScriptableRenderPipeline/Core/CoreRP/ShaderLibrary/BSDF.hlsl


return F_Transm_Schlick(f0, 1.0, u); // sub mul mul mad mad*3
}
// Ref: https://seblagarde.wordpress.com/2013/04/29/memo-on-fresnel-equations/
// Fresnel dieletric / dielectric
real F_Fresnel(real ior, real u)
{
float g = sqrt(Sq(ior) + Sq(u) - 1.0);
return 0.5 * Sq((g - u) / (g + u)) * (1.0 + Sq(((g + u) * u - 1.0) / ((g - u) * u + 1.0)));
}
//-----------------------------------------------------------------------------
// Specular BRDF
//-----------------------------------------------------------------------------

正在加载...
取消
保存