浏览代码

Flatten scalarized transmission to remove the branch

/asmdef
GitHub 7 年前
当前提交
42e2473c
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 4
      ScriptableRenderPipeline/HDRenderPipeline/Material/Lit/Lit.hlsl

4
ScriptableRenderPipeline/HDRenderPipeline/Material/Lit/Lit.hlsl


lighting.specular *= intensity * lightData.specularScale;
}
[branch] if (bsdfData.enableTransmission)
[flatten] if (bsdfData.enableTransmission)
{
// We use diffuse lighting for accumulation since it is going to be blurred during the SSS pass.
lighting.diffuse += EvaluateTransmission(bsdfData, NdotL, preLightData.NdotV, attenuation * lightData.diffuseScale);

lighting.specular *= intensity * lightData.specularScale;
}
[branch] if (bsdfData.enableTransmission)
[flatten] if (bsdfData.enableTransmission)
{
// We use diffuse lighting for accumulation since it is going to be blurred during the SSS pass.
lighting.diffuse += EvaluateTransmission(bsdfData, NdotL, preLightData.NdotV, attenuation * lightData.diffuseScale);

正在加载...
取消
保存