|
@@ -202,7 +202,7 @@ void light_compute(vec3 N, vec3 L, vec3 V, float A, vec3 light_color, float atte
|
|
|
float cLdotH5 = SchlickFresnel(cLdotH);
|
|
|
// Calculate Fresnel using specular occlusion term from Filament:
|
|
|
// https://google.github.io/filament/Filament.html#lighting/occlusion/specularocclusion
|
|
|
- float f90 = clamp(dot(f0, vec3(50.0 * 0.33)), 0.0, 1.0);
|
|
|
+ float f90 = clamp(dot(f0, vec3(50.0 * 0.33)), metallic, 1.0);
|
|
|
vec3 F = f0 + (f90 - f0) * cLdotH5;
|
|
|
|
|
|
vec3 specular_brdf_NL = cNdotL * D * F * G;
|