浏览代码

Add a comment

/stochastic_alpha_test
Evgenii Golubev 7 年前
当前提交
34357725
共有 1 个文件被更改,包括 6 次插入2 次删除
  1. 8
      ScriptableRenderPipeline/Core/ShaderLibrary/BSDF.hlsl

8
ScriptableRenderPipeline/Core/ShaderLibrary/BSDF.hlsl


float lightScatter = F_Schlick(1.0, fd90, NdotL);
float viewScatter = F_Schlick(1.0, fd90, NdotV);
// Normalize the BRDF for polar viewing angles up to (Pi/4).
// Hopefully the compiler folds the constant together with (1/Pi).
// Normalize the BRDF for polar view angles of up to (Pi/4).
// We use the worst case of (roughness = albedo = 1), and, for each view angle,
// integrate (brdf * cos(theta_light)) over all light directions.
// The resulting value is for (theta_view = 0), which is actually a little bit larger
// than the value of the integral for (theta_view = Pi/4).
// Hopefully, the compiler folds the constant together with (1/Pi).
return rcp(1.03571) * (lightScatter * viewScatter);
}

正在加载...
取消
保存