Bake UV2 emission using half float in the compatibility backend #101730
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 theGL_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