浏览代码

Lerp sampling direction for environment lighting with roughness

/feature-ReflectionProbeFit
Frédéric Vauchelles 7 年前
当前提交
64704f00
共有 1 个文件被更改,包括 2 次插入0 次删除
  1. 2
      ScriptableRenderPipeline/HDRenderPipeline/Material/Lit/Lit.hlsl

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


F = Sq(-F * bsdfData.coatCoverage + 1.0);
}
float roughness = PerceptualRoughnessToRoughness(bsdfData.perceptualRoughness);
R = lerp(R, preLightData.iblDirWS, saturate(smoothstep(0, 1, roughness * roughness)));
float4 preLD = SampleEnv(lightLoopContext, lightData.envIndex, R, preLightData.iblMipLevel);
envLighting += F * preLD.rgb;

正在加载...
取消
保存