浏览代码

Fix: use top angle for LambdaV for clearcoat if an option is enabled to use different angles for top and bottom interfaces.

/main
Stephane Laroche 7 年前
当前提交
3175d3e9
共有 1 个文件被更改,包括 2 次插入1 次删除
  1. 3
      ScriptableRenderPipeline/HDRenderPipeline/HDRP/Material/StackLit/StackLit.hlsl

3
ScriptableRenderPipeline/HDRenderPipeline/HDRP/Material/StackLit/StackLit.hlsl


// VLAYERING:
// --------------------------------------------------------------------
// Save top angles in case VLAYERED_USE_REFRACTED_ANGLES_FOR_BASE option is used
float topLdotH = LdotH; // == VdotH)
float topNdotH = NdotH;
float topNdotL = NdotL;

// Notice topLdotH as interface angle, symmetric model parametrization (see sec. 6 and comments
// on ComputeAdding)
// layered*Roughness* and vLayerEnergyCoeff are now updated for the proper light direction.
preLightData.partLambdaV[COAT_LOBE_IDX] = GetSmithJointGGXPartLambdaV(NdotV, preLightData.layeredCoatRoughness);
preLightData.partLambdaV[COAT_LOBE_IDX] = GetSmithJointGGXPartLambdaV(topNdotV, preLightData.layeredCoatRoughness);
#endif
// p9 eq(39): if we don't recompute per light, we just reuse the IBL energy terms as the fresnel terms

正在加载...
取消
保存