Fix clear color being incorrect in Environment background with HDR 2D.

This commit is contained in:
Allen Pestaluky 2025-07-16 13:55:20 -04:00
parent 9dd6c4dbac
commit f37edd524f
4 changed files with 12 additions and 1 deletions

View file

@ -219,6 +219,8 @@ void RendererCompositorRD::set_boot_image_with_stretch(const Ref<Image> &p_image
screenrect.position /= window_size;
screenrect.size /= window_size;
// p_color never needs to be converted to linear encoding because HDR 2D is always disabled for the boot image.
// If HDR 2D can ever be enabled during the boot image, p_color must be converted to linear encoding for this case.
RD::DrawListID draw_list = RD::get_singleton()->draw_list_begin_for_screen(DisplayServer::MAIN_WINDOW_ID, p_color);
RD::get_singleton()->draw_list_bind_render_pipeline(draw_list, blit.pipelines[BLIT_MODE_NORMAL_ALPHA]);