浏览代码

Rename ImportanceSampleGGXDirIsotropic() to ImportanceSampleGGXViewIndDir() to avoid confusion

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

20
Assets/ScriptableRenderLoop/ShaderLibrary/ImageBasedLighting.hlsl


}
// Special case where N == V.
void ImportanceSampleGGXDirIsotropic(float2 u,
float3 V,
float3 N,
float3 tangentX,
float3 tangentY,
float roughness,
out float3 L,
out float NdotH)
// Special case of ImportanceSampleGGXDir() where N == V.
// Approximates GGX with a BRDF which is isotropic for all viewing angles.
void ImportanceSampleGGXViewIndDir(float2 u,
float3 N,
float3 tangentX,
float3 tangentY,
float roughness,
out float3 L,
out float NdotH)
{
// GGX NDF sampling
float cosThetaH = sqrt((1.0 - u.x) / (1.0 + (roughness * roughness - 1.0) * u.x));

float3 L;
float NdotH;
ImportanceSampleGGXDirIsotropic(u, V, N, tangentX, tangentY, roughness, L, NdotH);
ImportanceSampleGGXViewIndDir(u, V, N, tangentX, tangentY, roughness, L, NdotH);
float NdotL = saturate(dot(N, L));

正在加载...
取消
保存