From 3df5907c87e5e0afe02074e6a43b85ff41ef369e Mon Sep 17 00:00:00 2001 From: LRFLEW Date: Sat, 22 Jul 2023 01:31:02 -0500 Subject: [PATCH] Mobile: Uncomment code required for fog rendering on clear color (cherry picked from commit db17415df837f4900fed418c9c7646632ef2bba0) --- .../renderer_rd/forward_mobile/render_forward_mobile.cpp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/servers/rendering/renderer_rd/forward_mobile/render_forward_mobile.cpp b/servers/rendering/renderer_rd/forward_mobile/render_forward_mobile.cpp index 61a940593cf..98a26ac36e1 100644 --- a/servers/rendering/renderer_rd/forward_mobile/render_forward_mobile.cpp +++ b/servers/rendering/renderer_rd/forward_mobile/render_forward_mobile.cpp @@ -805,24 +805,20 @@ void RenderForwardMobile::_render_scene(RenderDataRD *p_render_data, const Color clear_color.r *= bg_energy_multiplier; clear_color.g *= bg_energy_multiplier; clear_color.b *= bg_energy_multiplier; - /* - if (p_render_data->render_buffers->has_custom_data(RB_SCOPE_FOG) || environment_get_fog_enabled(p_render_data->environment)) { + if (environment_get_fog_enabled(p_render_data->environment)) { draw_sky_fog_only = true; RendererRD::MaterialStorage::get_singleton()->material_set_param(sky.sky_scene_state.fog_material, "clear_color", Variant(clear_color.srgb_to_linear())); } - */ } break; case RS::ENV_BG_COLOR: { clear_color = environment_get_bg_color(p_render_data->environment); clear_color.r *= bg_energy_multiplier; clear_color.g *= bg_energy_multiplier; clear_color.b *= bg_energy_multiplier; - /* - if (p_render_data->render_buffers->has_custom_data(RB_SCOPE_FOG) || environment_get_fog_enabled(p_render_data->environment)) { + if (environment_get_fog_enabled(p_render_data->environment)) { draw_sky_fog_only = true; RendererRD::MaterialStorage::get_singleton()->material_set_param(sky.sky_scene_state.fog_material, "clear_color", Variant(clear_color.srgb_to_linear())); } - */ } break; case RS::ENV_BG_SKY: { draw_sky = true;