浏览代码

Fix anisotropic GGX (again)

/main
Evgenii Golubev 8 年前
当前提交
08cf94d6
共有 1 个文件被更改,包括 4 次插入2 次删除
  1. 6
      Assets/ScriptableRenderLoop/ShaderLibrary/ImageBasedLighting.hlsl

6
Assets/ScriptableRenderLoop/ShaderLibrary/ImageBasedLighting.hlsl


// weightOverPdf = F(H) * 4 * (N.L) * V(V, L) * (L.H) / (N.H) with V(V, L) = G(V, L) / (4 * (N.L) * (N.V))
// Remind (L.H) == (V.H)
// F is apply outside the function
// For anisotropy we must not saturate these values
float TdotL = saturate(dot(tangentX, L));
float BdotL = saturate(dot(tangentY, L));
float TdotL = dot(tangentX, L);
float BdotL = dot(tangentY, L);
float Vis = V_SmithJointGGXAniso(TdotV, BdotV, NdotV, TdotL, BdotL, NdotL, roughnessT, roughnessB);
weightOverPdf = 4.0 * Vis * NdotL * VdotH / NdotH;

正在加载...
取消
保存