Don't add clearcoat BRDF to specular light as-is.

BRDF needs to be multiplied with N.L, the incoming light and attenuation. Also specular_blob_intensity should affect clearcoat.
This commit is contained in:
Ferenc Arn 2017-10-21 19:52:16 -04:00
parent 50306041e5
commit 06fcbe0092

View file

@ -1115,7 +1115,9 @@ LIGHT_SHADER_CODE
float Gr = G_GGX_2cos(cNdotL, .25) * G_GGX_2cos(cNdotV, .25);
specular_light += .25*clearcoat*Gr*Fr*Dr;
float specular_brdf_NL = 0.25 * clearcoat * Gr * Fr * Dr * cNdotL;
specular_light += specular_brdf_NL * light_color * specular_blob_intensity * attenuation;
}
#endif
}