diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2018-11-28 16:21:59 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-11-28 16:21:59 +0100 |
commit | a741f83811668fd89ca0601568c8511185adedc2 (patch) | |
tree | a35a887abc9ba5b2a580cd589bd9ab00a5c05bbb | |
parent | c608d770d8bdff5c7c02ef9829befe51d69846d6 (diff) | |
parent | 1a7d1d88f8063fac8712f53ef1911fea315df758 (diff) |
Merge pull request #23945 from DavidSichma/gles2artifact
Fixed black artifacts on SpatialMaterial [GLES2]
-rw-r--r-- | drivers/gles2/shaders/scene.glsl | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gles2/shaders/scene.glsl b/drivers/gles2/shaders/scene.glsl index 3deb4e5467..15b90a7771 100644 --- a/drivers/gles2/shaders/scene.glsl +++ b/drivers/gles2/shaders/scene.glsl @@ -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); |