浏览代码

use the computed value ambient_accum for ambient_light in scene_forward_mobile.glsl

Priyansh Rathi 3 年之前
父节点
当前提交
8c37cfa5bb
共有 1 个文件被更改,包括 6 次插入0 次删除
  1. 6 0
      servers/rendering/renderer_rd/shaders/scene_forward_mobile.glsl

+ 6 - 0
servers/rendering/renderer_rd/shaders/scene_forward_mobile.glsl

@@ -1054,6 +1054,12 @@ void main() {
 		if (reflection_accum.a > 0.0) {
 		if (reflection_accum.a > 0.0) {
 			specular_light = reflection_accum.rgb / reflection_accum.a;
 			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
 	} //Reflection probes
 
 
 	// finalize ambient light here
 	// finalize ambient light here