Skip to content

Ensure that BPTC LayeredTexture images get compressed with same signedness#119598

Open
nikitalita wants to merge 1 commit into
godotengine:masterfrom
nikitalita:ensure-bptc-textures
Open

Ensure that BPTC LayeredTexture images get compressed with same signedness#119598
nikitalita wants to merge 1 commit into
godotengine:masterfrom
nikitalita:ensure-bptc-textures

Conversation

@nikitalita
Copy link
Copy Markdown
Contributor

What problem(s) does this PR solve?

Additional information

This fixes the issue by running detect_signed() on the whole image before saving it as compressed textures, and then passing in the signedness as a parameter to Image::_compress_from_channels()

I added Image::_compress_from_channels() to the Image class for this because I did not want to modify the public API and I don't think it's necessary for the BPTC option functionality to be exposed; let me know if you want me to modify compress() to expose that.

@nikitalita nikitalita requested review from a team as code owners May 20, 2026 06:32
@AThousandShips AThousandShips added this to the 4.x milestone May 20, 2026
@fire
Copy link
Copy Markdown
Member

fire commented May 20, 2026

@BlueCube3310 If you have some time can you look into this?

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.

Layered Textures imported with BPTC has image layers of differing signedness

3 participants