Mobile: Uncomment code required for fog rendering on clear color
(cherry picked from commit db17415df8
)
This commit is contained in:
parent
2192c717a4
commit
3df5907c87
|
@ -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;
|
||||||
|
|
Loading…
Reference in New Issue