diff options
author | David Sichma <sichmada@gmail.com> | 2018-11-24 16:06:39 +0100 |
---|---|---|
committer | David Sichma <sichmada@gmail.com> | 2018-11-24 16:51:32 +0100 |
commit | 1a7d1d88f8063fac8712f53ef1911fea315df758 (patch) | |
tree | a63057c06365b6ea63feae6d19a32830dce9f897 /drivers/gles2 | |
parent | 8348aca118311b82f632781b19230471fae56d4a (diff) |
Fixed black artifacts on SpatialMaterial [GLES2]
Diffstat (limited to 'drivers/gles2')
-rw-r--r-- | drivers/gles2/shaders/scene.glsl | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/gles2/shaders/scene.glsl b/drivers/gles2/shaders/scene.glsl index bc83b69b49..15b90a7771 100644 --- a/drivers/gles2/shaders/scene.glsl +++ b/drivers/gles2/shaders/scene.glsl @@ -84,8 +84,6 @@ uniform highp mat4 world_transform; uniform highp float time; - - #ifdef RENDER_DEPTH uniform float light_bias; uniform float light_normal_bias; @@ -1121,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); |