summaryrefslogtreecommitdiff
path: root/servers
diff options
context:
space:
mode:
authorPriyansh Rathi <techiepriyansh@gmail.com>2022-03-05 14:22:14 +0530
committerPriyansh Rathi <techiepriyansh@gmail.com>2022-03-05 14:24:40 +0530
commit8c37cfa5bbed2044c95e4953b4f2662f2ce8496a (patch)
treef760a133709b60b2d79fd7b2650b3b8e97538036 /servers
parent0b08c4d3d441b2fce3f7608f0d9f09572ec8906f (diff)
use the computed value ambient_accum for ambient_light in scene_forward_mobile.glsl
Diffstat (limited to 'servers')
-rw-r--r--servers/rendering/renderer_rd/shaders/scene_forward_mobile.glsl6
1 files changed, 6 insertions, 0 deletions
diff --git a/servers/rendering/renderer_rd/shaders/scene_forward_mobile.glsl b/servers/rendering/renderer_rd/shaders/scene_forward_mobile.glsl
index a1cf1d3c04..21b8f2d4b5 100644
--- a/servers/rendering/renderer_rd/shaders/scene_forward_mobile.glsl
+++ b/servers/rendering/renderer_rd/shaders/scene_forward_mobile.glsl
@@ -1054,6 +1054,12 @@ void main() {
if (reflection_accum.a > 0.0) {
specular_light = reflection_accum.rgb / reflection_accum.a;
}
+
+#if !defined(USE_LIGHTMAP)
+ if (ambient_accum.a > 0.0) {
+ ambient_light = ambient_accum.rgb / ambient_accum.a;
+ }
+#endif
} //Reflection probes
// finalize ambient light here