mirror of
https://github.com/godotengine/godot.git
synced 2025-12-08 06:09:55 +00:00
parent
2c5fa0947d
commit
3e09b9b335
1 changed files with 7 additions and 1 deletions
|
|
@ -1013,7 +1013,7 @@ LIGHT_SHADER_CODE
|
||||||
#elif defined(SPECULAR_DISABLED)
|
#elif defined(SPECULAR_DISABLED)
|
||||||
//none..
|
//none..
|
||||||
|
|
||||||
#else
|
#elif defined(SPECULAR_SCHLICK_GGX)
|
||||||
// shlick+ggx as default
|
// shlick+ggx as default
|
||||||
float alpha = roughness * roughness;
|
float alpha = roughness * roughness;
|
||||||
|
|
||||||
|
|
@ -1056,6 +1056,12 @@ LIGHT_SHADER_CODE
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(LIGHT_USE_CLEARCOAT)
|
#if defined(LIGHT_USE_CLEARCOAT)
|
||||||
|
# if !defined(SPECULAR_SCHLICK_GGX)
|
||||||
|
vec3 H = normalize(V + L);
|
||||||
|
float dotLH5 = SchlickFresnel( dotLH );
|
||||||
|
float dotNH = max(dot(N,H), 0.0 );
|
||||||
|
# endif
|
||||||
|
|
||||||
float Dr = GTR1(dotNH, mix(.1,.001,clearcoat_gloss));
|
float Dr = GTR1(dotNH, mix(.1,.001,clearcoat_gloss));
|
||||||
float Fr = mix(.04, 1.0, dotLH5);
|
float Fr = mix(.04, 1.0, dotLH5);
|
||||||
float Gr = G1V(dotNL, .25) * G1V(dotNV, .25);
|
float Gr = G1V(dotNL, .25) * G1V(dotNV, .25);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue