|
|
|
|
|
|
// 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 |
|
|
|