diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2019-04-29 16:55:36 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-04-29 16:55:36 +0200 |
commit | a3617f6ca82f4c8121f75d9d2c342ef5431dd214 (patch) | |
tree | 0451568f2f596bc321adecd1662bc006c9a37176 | |
parent | 3b509a9c534d0cbfabcd682a30c527c0027f0a38 (diff) | |
parent | 61a844aa61861cf2eb5b2721301a4dcc6c4020a4 (diff) |
Merge pull request #28431 from SouzaGuilherme/master
Adds flag AMBIENT_LIGHT_DISABLED to GLES2
-rw-r--r-- | drivers/gles2/shaders/scene.glsl | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/gles2/shaders/scene.glsl b/drivers/gles2/shaders/scene.glsl index 5d21c679ba..1c35b455c4 100644 --- a/drivers/gles2/shaders/scene.glsl +++ b/drivers/gles2/shaders/scene.glsl @@ -1545,6 +1545,11 @@ FRAGMENT_SHADER_CODE #ifdef BASE_PASS //none + +#ifdef AMBIENT_LIGHT_DISABLED + ambient_light = vec3(0.0, 0.0, 0.0); +#else + #ifdef USE_RADIANCE_MAP vec3 ref_vec = reflect(-eye_position, N); @@ -1567,6 +1572,7 @@ FRAGMENT_SHADER_CODE #endif +#endif // AMBIENT_LIGHT_DISABLED ambient_light *= ambient_energy; #if defined(USE_REFLECTION_PROBE1) || defined(USE_REFLECTION_PROBE2) |