浏览代码

Remove IntegrateGgxWithoutFresnel()

/Yibing-Project-2
Evgenii Golubev 7 年前
当前提交
0559a949
共有 1 个文件被更改,包括 0 次插入26 次删除
  1. 26
      ScriptableRenderPipeline/Core/ShaderLibrary/ImageBasedLighting.hlsl

26
ScriptableRenderPipeline/Core/ShaderLibrary/ImageBasedLighting.hlsl


return acc / sampleCount;
}
float IntegrateGgxWithoutFresnel(float3 V, float3 N, float roughness, uint sampleCount = 4096)
{
float NdotV = saturate(dot(N, V));
float total = 0;
float3x3 localToWorld = GetLocalFrame(N);
for (uint i = 0; i < sampleCount; ++i)
{
float2 u = Golden2dSeq(i, sampleCount);
float3 L;
float VdotH, NdotL, weight;
// Compute Weight = BSDF * NdotL / PDF. F = 1.
ImportanceSampleGGX(u, V, localToWorld, roughness, NdotV, L, VdotH, NdotL, weight);
if (NdotL > 0.0)
{
total += weight;
}
}
return saturate(total * rcp(sampleCount));
}
uint GetIBLRuntimeFilterSampleCount(uint mipLevel)
{
uint sampleCount = 0;

正在加载...
取消
保存