Skip to content

texconv: added cases where BC4/BC5 need to decompress to 4 channels - #723

Merged
walbourn merged 2 commits into
mainfrom
texconvbc4bc5fix
Aug 4, 2026
Merged

texconv: added cases where BC4/BC5 need to decompress to 4 channels#723
walbourn merged 2 commits into
mainfrom
texconvbc4bc5fix

Conversation

@walbourn

@walbourn walbourn commented Jul 28, 2026

Copy link
Copy Markdown
Collaborator

Normally BC4 decompresses to R8 and BC5 decompresses to R8G8 to match the channel count of those formats. If doing swizzle operations for the B or A channel, inverting the G channel for BC4, or if reconstructing the B channel for normal maps, we need room for the new data or it gets lost. For cases where you are converting BC5 to DXT5nm, it also needs expanded to 4 channels.

This change has the decompressing going to RGBA32 (4-channels) in these cases rather than the narrower format.

@walbourn walbourn added bug tools Applies to texconv, texdiag, texassemble, etc. labels Jul 29, 2026
@walbourn
walbourn merged commit f5ff200 into main Aug 4, 2026
132 checks passed
@walbourn
walbourn deleted the texconvbc4bc5fix branch August 4, 2026 07:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug tools Applies to texconv, texdiag, texassemble, etc.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Converting BC5U to BC3n doesn't give the converted texture a proper alpha channel

2 participants