summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorLogan Lang <devloglogan@gmail.com>2022-09-19 08:27:42 -0500
committerLogan Lang <devloglogan@gmail.com>2022-09-19 17:12:32 -0500
commite61d8b6f530923095c0990cd04920e4a024a6da0 (patch)
tree127bd6bb7383222af856791a3b9fea9ed6032c96 /drivers
parent63c0dc690e06731224e88911ed16d1b798b681b5 (diff)
enabled 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 efd6036ba9..a23828bb8a 100644
--- a/drivers/gles3/shaders/scene.glsl
+++ b/drivers/gles3/shaders/scene.glsl
@@ -1096,9 +1096,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);