Merge pull request #28431 from SouzaGuilherme/master

Adds flag AMBIENT_LIGHT_DISABLED to GLES2
This commit is contained in:
Rémi Verschelde 2019-04-29 16:55:36 +02:00 committed by GitHub
commit a3617f6ca8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 0 deletions

View File

@ -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)