Mobile: Uncomment code required for fog rendering on clear color

This commit is contained in:
LRFLEW 2023-07-22 01:31:02 -05:00
parent 6588a4a29a
commit db17415df8
1 changed files with 2 additions and 6 deletions

View File

@ -805,24 +805,20 @@ void RenderForwardMobile::_render_scene(RenderDataRD *p_render_data, const Color
clear_color.r *= bg_energy_multiplier; clear_color.r *= bg_energy_multiplier;
clear_color.g *= bg_energy_multiplier; clear_color.g *= bg_energy_multiplier;
clear_color.b *= bg_energy_multiplier; clear_color.b *= bg_energy_multiplier;
/* if (environment_get_fog_enabled(p_render_data->environment)) {
if (p_render_data->render_buffers->has_custom_data(RB_SCOPE_FOG) || environment_get_fog_enabled(p_render_data->environment)) {
draw_sky_fog_only = true; 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())); RendererRD::MaterialStorage::get_singleton()->material_set_param(sky.sky_scene_state.fog_material, "clear_color", Variant(clear_color.srgb_to_linear()));
} }
*/
} break; } break;
case RS::ENV_BG_COLOR: { case RS::ENV_BG_COLOR: {
clear_color = environment_get_bg_color(p_render_data->environment); clear_color = environment_get_bg_color(p_render_data->environment);
clear_color.r *= bg_energy_multiplier; clear_color.r *= bg_energy_multiplier;
clear_color.g *= bg_energy_multiplier; clear_color.g *= bg_energy_multiplier;
clear_color.b *= bg_energy_multiplier; clear_color.b *= bg_energy_multiplier;
/* if (environment_get_fog_enabled(p_render_data->environment)) {
if (p_render_data->render_buffers->has_custom_data(RB_SCOPE_FOG) || environment_get_fog_enabled(p_render_data->environment)) {
draw_sky_fog_only = true; 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())); RendererRD::MaterialStorage::get_singleton()->material_set_param(sky.sky_scene_state.fog_material, "clear_color", Variant(clear_color.srgb_to_linear()));
} }
*/
} break; } break;
case RS::ENV_BG_SKY: { case RS::ENV_BG_SKY: {
draw_sky = true; draw_sky = true;