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

--ignore-mips does not apply to array textures #567

Merged
merged 1 commit into from
Dec 16, 2024

Conversation

walbourn
Copy link
Member

@walbourn walbourn commented Dec 14, 2024

The --ignore-mips flag add in #484 is intended as a 'header hack' to treats the mipLevel as if it were 1 in DDS files. This is a workaround for some corrupt files. This doesn't work on cubemaps, arrays, or cubemap arrays because of how miplevels are laid out in those files.

This change just makes --ignore-mips only work on arraySize=1 textures since modifying the mipLevel count is not correct for array textures with mips. For array textures/cubemaps, the flag is ignored.

You can remove mips in general by copying out the top-level mips to a new image. The texconv tool will do this with -m 1.

@walbourn walbourn self-assigned this Dec 14, 2024
@walbourn walbourn linked an issue Dec 14, 2024 that may be closed by this pull request
@walbourn walbourn added bug dds DirectDraw Surface (DDS) labels Dec 15, 2024
@walbourn walbourn merged commit aec0784 into main Dec 16, 2024
102 checks passed
@walbourn walbourn deleted the ignoremipsignoresarray branch December 16, 2024 18:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug dds DirectDraw Surface (DDS)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

DDS cube map that DirectXTex corrupts faces when extracting
2 participants