浏览代码

Small fix for extreme value

/main
sebastienlagarde 7 年前
当前提交
dffeb424
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 2
      ScriptableRenderPipeline/HDRenderPipeline/Material/Lit/LitData.hlsl

2
ScriptableRenderPipeline/HDRenderPipeline/Material/Lit/LitData.hlsl


// Retrieve cone angle
// Ambient occlusion is cosine weighted, thus use following equation. See slide 129
float cosAv = sqrt(1.0 - surfaceData.ambientOcclusion);
float roughness = PerceptualSmoothnessToRoughness(surfaceData.perceptualSmoothness);
float roughness = max(PerceptualSmoothnessToRoughness(surfaceData.perceptualSmoothness), 0.01); // Clamp to 0.01 to avoid edge cases
float cosAs = exp2(-3.32193 * Sqr(roughness));
float cosB = dot(bentNormalWS, reflect(-V, surfaceData.normalWS));

正在加载...
取消
保存