Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bake UV2 emission using half float in the compatibility backend #101730

Merged
merged 1 commit into from
Jan 20, 2025

Conversation

clayjohn
Copy link
Member

Fixes: #101589

As I suspected, this is an existing issue that was made worse in 4.4

The problem came from the fact that we used a full float texture, but when retrieving the texture we used a "real format" of half float. We could have just changed the "real format" to full float, but the lightmapper expects a half float texture anyway, so it is better to just bake in half float.

IIRC I used full float originally as I thought there wasn't as much support for half float. But anywhere full float is supported half float is as well. I.e. RGBA16F is a required renderable format in the OpenGL 3.3 spec and is required for the GL_EXT_color_buffer_float extension.

We can cherrypick this to 4.3 since the core bug is present there too. The regression component of this is just how obvious the problem became in 4.4

The Lightmapper expects a half float image anyway, so this is both more efficient and correct
@clayjohn clayjohn added bug topic:rendering regression cherrypick:4.3 Considered for cherry-picking into a future 4.3.x release labels Jan 18, 2025
@clayjohn clayjohn added this to the 4.4 milestone Jan 18, 2025
@clayjohn clayjohn requested a review from a team as a code owner January 18, 2025 00:52
Copy link
Contributor

@BlueCube3310 BlueCube3310 left a comment

Choose a reason for hiding this comment

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

Also fixes #94406

@clayjohn clayjohn changed the title Baked UV2 emission using half float in the compatibility backend Bake UV2 emission using half float in the compatibility backend Jan 18, 2025
@Repiteo Repiteo merged commit 604e3ab into godotengine:master Jan 20, 2025
20 checks passed
@Repiteo
Copy link
Contributor

Repiteo commented Jan 20, 2025

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug cherrypick:4.3 Considered for cherry-picking into a future 4.3.x release regression topic:rendering
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Baking LightmapGI with emission in Compatibility renderer leads to broken colors
4 participants