Skip to content

Conversation

BlueCube3310
Copy link
Contributor

Fixes #106422

Manages the remapped channel count in a sophisticated way that expands their amount only when said channel is necessary. This ensures that the memory usage, as well as extended import times due to format conversion, are kept to the minimum.

This needs a lot of testing. From my own, it looks like it works as intended, though since it's a complicated change it would be best to ensure it works for as many remap/format combinations as possible.

@BlueCube3310 BlueCube3310 requested a review from a team as a code owner May 15, 2025 11:52
@BlueCube3310 BlueCube3310 added this to the 4.x milestone May 15, 2025
Copy link
Member

@Calinou Calinou left a comment

Choose a reason for hiding this comment

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

Tested locally with the MRP from #106422, it works as expected. Code looks good to me.

master This PR
image image

@LiveTrower
Copy link
Contributor

I've tried various textures and combinations, and I found a detail that I don't quite understand.

I'm going to give two examples:

First, an RGB texture where we set the Green and Blue channels to Zero, leaving only the Red channel, gives us this result.
Channel_R

But if we change the Red channel to Zero and the Green channel to its default value, the Alpha channel appears, which didn't happen in the previous example.
Channel_G

Is this a bug?

@BlueCube3310
Copy link
Contributor Author

Is this a bug?

It is, I noticed it too but it looks like it's related to the Image function that detects the used channels. I'll look into it as well

@fire fire requested a review from a team May 15, 2025 18:53
@fire
Copy link
Member

fire commented May 15, 2025

It is, I noticed it too but it looks like it's related to the Image function that detects the used channels. I'll look into it as well

does this need to be resolved before merge?

@BlueCube3310
Copy link
Contributor Author

It is, I noticed it too but it looks like it's related to the Image function that detects the used channels. I'll look into it as well

does this need to be resolved before merge?

I figured out what causes this, it's a fairly simple fix but I would like to make a separate PR for that.

@akien-mga akien-mga modified the milestones: 4.x, 4.5 May 16, 2025
@Repiteo Repiteo merged commit ce2f047 into godotengine:master May 16, 2025
20 checks passed
@Repiteo
Copy link
Contributor

Repiteo commented May 16, 2025

Thanks!

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.

Channel Remap: Information not preserved when remapping to a non-existent destination channel

6 participants