|
@@ -983,6 +983,10 @@ void main(void) {
|
|
#endif
|
|
#endif
|
|
|
|
|
|
specularEnvironmentReflectance *= conservationFactor;
|
|
specularEnvironmentReflectance *= conservationFactor;
|
|
|
|
+
|
|
|
|
+ #if defined(ENVIRONMENTBRDF) && defined(MS_BRDF_ENERGY_CONSERVATION)
|
|
|
|
+ vec3 energyConservationFactorClearCoat = getEnergyConservationFactor(specularEnvironmentR0, environmentClearCoatBrdf);
|
|
|
|
+ #endif
|
|
#endif
|
|
#endif
|
|
|
|
|
|
// _____________________________ Transmittance + Tint ________________________________
|
|
// _____________________________ Transmittance + Tint ________________________________
|
|
@@ -1144,7 +1148,7 @@ void main(void) {
|
|
// Full value needed for alpha.
|
|
// Full value needed for alpha.
|
|
vec3 finalClearCoatScaled = finalClearCoat * vLightingIntensity.x * vLightingIntensity.w;
|
|
vec3 finalClearCoatScaled = finalClearCoat * vLightingIntensity.x * vLightingIntensity.w;
|
|
#if defined(ENVIRONMENTBRDF) && defined(MS_BRDF_ENERGY_CONSERVATION)
|
|
#if defined(ENVIRONMENTBRDF) && defined(MS_BRDF_ENERGY_CONSERVATION)
|
|
- finalClearCoatScaled *= energyConservationFactor;
|
|
|
|
|
|
+ finalClearCoatScaled *= energyConservationFactorClearCoat;
|
|
#endif
|
|
#endif
|
|
|
|
|
|
// ____________________________ Clear Coat Radiance _______________________________
|
|
// ____________________________ Clear Coat Radiance _______________________________
|