浏览代码

Add Fresnel back to line lights

/main
Evgenii Golubev 7 年前
当前提交
470cff8e
共有 1 个文件被更改,包括 3 次插入5 次删除
  1. 8
      Assets/ScriptableRenderPipeline/HDRenderPipeline/Material/Lit/Lit.hlsl

8
Assets/ScriptableRenderPipeline/HDRenderPipeline/Material/Lit/Lit.hlsl


if (bsdfData.materialId == MATERIALID_LIT_CLEAR_COAT)
{
ltcValue = LTCEvaluate(P1, P2, B, preLightData.ltcXformClearCoat);
specularLighting += ltcValue * bsdfData.coatCoverage;
// TODO: no fresnel ?
specularLighting += preLightData.ltcClearCoatFresnelTerm * (ltcValue * bsdfData.coatCoverage);
specularLighting += ltcValue;
// TODO: no fresnel ?
specularLighting += preLightData.ltcGGXFresnelTerm * ltcValue;
specularLighting *= lightData.color * lightData.specularScale;
}

if (bsdfData.materialId == MATERIALID_LIT_CLEAR_COAT)
{
ltcValue = LTCEvaluate(matL, V, bsdfData.coatNormalWS, preLightData.coatNdotV, preLightData.ltcXformClearCoat);
specularLighting += preLightData.ltcClearCoatFresnelTerm * ltcValue * bsdfData.coatCoverage;
specularLighting += preLightData.ltcClearCoatFresnelTerm * (ltcValue * bsdfData.coatCoverage);
// modify matL value based on Fresnel transmission
matL = mul(matL, preLightData.ltcCoatT);

正在加载...
取消
保存