mirror of
https://github.com/godotengine/godot.git
synced 2025-12-08 06:09:55 +00:00
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:
parent
50306041e5
commit
06fcbe0092
1 changed files with 6 additions and 4 deletions
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue