|
|
|
|
|
|
|
|
|
|
preLightData.coatPartLambdaV = GetSmithJointGGXPartLambdaV(NdotV, CLEAR_COAT_ROUGHNESS); |
|
|
|
preLightData.coatIblR = reflect(-V, N); |
|
|
|
|
|
|
|
preLightData.coatIblF = F_Schlick(CLEAR_COAT_F0, NdotV) * bsdfData.coatMask; |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
// We don't multiply by 'bsdfData.diffuseColor' here. It's done only once in PostEvaluateBSDF(). |
|
|
|
|
|
|
|
// See comment for specular magnitude, it apply to diffuse as well |
|
|
|
#ifdef USE_DIFFUSE_LAMBERT_BRDF |
|
|
|
lighting.diffuse = ltcValue; |
|
|
|
#else |
|
|
|
#endif |
|
|
|
|
|
|
|
UNITY_BRANCH if (HasFlag(bsdfData.materialFeatures, MATERIALFEATUREFLAGS_LIT_TRANSMISSION)) |
|
|
|
{ |
|
|
|
|
|
|
ltcValue *= lightData.diffuseScale; |
|
|
|
// We don't multiply by 'bsdfData.diffuseColor' here. It's done only once in PostEvaluateBSDF(). |
|
|
|
// See comment for specular magnitude, it apply to diffuse as well |
|
|
|
#ifdef USE_DIFFUSE_LAMBERT_BRDF |
|
|
|
lighting.diffuse = ltcValue; |
|
|
|
#else |
|
|
|
#endif |
|
|
|
|
|
|
|
UNITY_BRANCH if (HasFlag(bsdfData.materialFeatures, MATERIALFEATUREFLAGS_LIT_TRANSMISSION)) |
|
|
|
{ |
|
|
|