From 8c37cfa5bbed2044c95e4953b4f2662f2ce8496a Mon Sep 17 00:00:00 2001 From: Priyansh Rathi Date: Sat, 5 Mar 2022 14:22:14 +0530 Subject: use the computed value ambient_accum for ambient_light in scene_forward_mobile.glsl --- servers/rendering/renderer_rd/shaders/scene_forward_mobile.glsl | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'servers/rendering/renderer_rd') 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 -- cgit v1.2.3