浏览代码

Update comments

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

9
Assets/ScriptableRenderLoop/ShaderLibrary/ImageBasedLighting.hlsl


if (!prefilter) // BRDF importance sampling
{
mipLevel = 0.0;
mipLevel = 0;
}
else // Prefiltered BRDF importance sampling
{

float invPdf = D_GGX_Inverse(NdotH, roughness) * 4.0;
// TODO: check the accuracy of the sample's solid angle fit for GGX.
float omegaS = rcp(sampleCount) * invPdf; // Solid angle associated with the sample
float omegaS = rcp(sampleCount) * invPdf;
// float omegaP = FOUR_PI / (6.0f * cubemapWidth * cubemapWidth); // Solid angle associated with the pixel of the cubemap
mipLevel = 0.5 * log2(omegaS * invOmegaP); // Clamp is not necessary as the hardware will do it
// float omegaP = FOUR_PI / (6.0f * cubemapWidth * cubemapWidth);
mipLevel = 0.5 * log2(omegaS * invOmegaP);
// TODO: find a more accurate MIP bias function.
mipLevel = lerp(mipLevel, maxMipLevel, bias);
}

正在加载...
取消
保存