X Tutup
Skip to content

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

Merged
akien-mga merged 1 commit intogodotengine:masterfrom
allenwp:98708-fix-clear-color-hdr2d
Nov 27, 2025
Merged

Fix clear color being incorrect in Environment background with HDR 2D.#108682
akien-mga merged 1 commit intogodotengine:masterfrom
allenwp:98708-fix-clear-color-hdr2d

Conversation

@allenwp
Copy link
Contributor

@allenwp allenwp commented Jul 16, 2025

Fixes #98708

The function that this PR changes seems to only be called by RendererSceneRenderRD::render_scene (used in the code path of the original bug report) and RendererCanvasRenderRD::_render_batch_items. One of those requires modifying the colour transfer function, but the other doesn't.

I've also added two @param comments regarding these sorts of issues in rendering_device.h.

@allenwp allenwp marked this pull request as ready for review July 16, 2025 21:25
@allenwp allenwp requested a review from a team as a code owner July 16, 2025 21:25
@Calinou Calinou added this to the 4.6 milestone Jul 16, 2025
@allenwp allenwp force-pushed the 98708-fix-clear-color-hdr2d branch from c9dfd41 to 50bd636 Compare September 5, 2025 18:14
@allenwp allenwp force-pushed the 98708-fix-clear-color-hdr2d branch from 50bd636 to b9ef2f0 Compare September 30, 2025 14:29
@allenwp allenwp force-pushed the 98708-fix-clear-color-hdr2d branch from b9ef2f0 to 42d7090 Compare November 26, 2025 19:38
@allenwp allenwp force-pushed the 98708-fix-clear-color-hdr2d branch from 42d7090 to f37edd5 Compare November 26, 2025 21:12
Copy link
Member

@clayjohn clayjohn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense. This avoids converting to linear in the one other place where render_target_get_clear_request_color() is called which is in the 3D renderer. It sets up the default background color which has srgb_to_linear() called on it anyway

@akien-mga akien-mga merged commit e4d2f1d into godotengine:master Nov 27, 2025
20 checks passed
@akien-mga
Copy link
Member

Thanks!

@allenwp allenwp deleted the 98708-fix-clear-color-hdr2d branch November 27, 2025 13:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2D HDR makes scenes significantly darker

4 participants

X Tutup