Merge pull request #23945 from DavidSichma/gles2artifact

Fixed black artifacts on SpatialMaterial [GLES2]
This commit is contained in:
Rémi Verschelde 2018-11-28 16:21:59 +01:00 committed by GitHub
commit a741f83811
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1119,7 +1119,7 @@ LIGHT_SHADER_CODE
float NdotL = dot(N, L);
float cNdotL = max(NdotL, 0.0); // clamped NdotL
float NdotV = dot(N, V);
float cNdotV = max(NdotV, 0.0);
float cNdotV = max(abs(NdotV), 1e-6);
#if defined(DIFFUSE_BURLEY) || defined(SPECULAR_BLINN) || defined(SPECULAR_SCHLICK_GGX) || defined(LIGHT_USE_CLEARCOAT)
vec3 H = normalize(V + L);