summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorClay John <claynjohn@gmail.com>2022-10-27 10:08:29 -0700
committerGitHub <noreply@github.com>2022-10-27 10:08:29 -0700
commit0d711cad30d675c3316201040967c587df3e39de (patch)
tree0fb7c845277bfd6dc95c1c6089fc1f5b40be99b5 /drivers
parent8fd92ed867a9fddf427d5999b872488c09582c41 (diff)
parente61d8b6f530923095c0990cd04920e4a024a6da0 (diff)
Merge pull request #66107 from devloglogan/ambient-light-disabled-fix
Fix ambient_light_disabled render mode flag
Diffstat (limited to 'drivers')
-rw-r--r--drivers/gles3/shaders/scene.glsl10
1 files changed, 8 insertions, 2 deletions
diff --git a/drivers/gles3/shaders/scene.glsl b/drivers/gles3/shaders/scene.glsl
index 2bd93796bd..ed176c7829 100644
--- a/drivers/gles3/shaders/scene.glsl
+++ b/drivers/gles3/shaders/scene.glsl
@@ -1129,9 +1129,15 @@ void main() {
#if defined(CUSTOM_IRRADIANCE_USED)
ambient_light = mix(ambient_light, custom_irradiance.rgb, custom_irradiance.a);
#endif // CUSTOM_IRRADIANCE_USED
- ambient_light *= albedo.rgb;
- ambient_light *= ao;
+ {
+#if defined(AMBIENT_LIGHT_DISABLED)
+ ambient_light = vec3(0.0, 0.0, 0.0);
+#else
+ ambient_light *= albedo.rgb;
+ ambient_light *= ao;
+#endif // AMBIENT_LIGHT_DISABLED
+ }
// convert ao to direct light ao
ao = mix(1.0, ao, ao_light_affect);