Merge pull request #14796 from AlmightyScientist/issue-14552

Shader Language: Fix Vertex Lighting artifacts.
This commit is contained in:
Juan Linietsky 2017-12-26 12:46:48 -03:00 committed by GitHub
commit b411029e31
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -174,7 +174,7 @@ void light_compute(vec3 N, vec3 L,vec3 V, vec3 light_color, float roughness, ino
vec3 H = normalize(V + L);
float dotNH = max(dot(N,H), 0.0 );
float intensity = pow( dotNH, (1.0-roughness) * 256.0);
float intensity = (roughness >= 1.0 ? 1.0 : pow( dotNH, (1.0-roughness) * 256.0));
specular += light_color * intensity;
}