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

Basis/UASTC texture compression support via ktx2 #17111

Merged
merged 6 commits into from
Mar 14, 2023

Conversation

hrydgard
Copy link
Owner

@hrydgard hrydgard commented Mar 13, 2023

Allows loading basis/UASTC textures in .ktx2 format, transcoding to whatever compressed texture formats are available.

To convert your textures to this format, use:

basisu texture.png -ktx2 -mipmap

or

basisu texture.png -ktx2 -uastc -mipmap

resulting in texture.ktx2. basisu.exe can be downloaded from here. The tradeoff here is that the first ones are smaller but worse quality and don't support alpha, while the second has full alpha support but is not quite as compatible with older hardware (I will add a fallback to decode to RGBA later though).

This allows for efficient and still cross-platform compatible compressed replacement textures - while not as fast as DDS to load, should be faster than png while still taking up a lot less memory when loaded. Will try to do some benchmarks later.

Currently causes some VK validation errors on the last mipmaps with rectangular textures, will fix before merge.

@hrydgard hrydgard added this to the v1.15.0 milestone Mar 13, 2023
@hrydgard hrydgard changed the title Basis texture compression support Basis/UASTC texture compression support via ktx2 Mar 13, 2023
@hrydgard hrydgard force-pushed the basis-texture-compression-support branch 2 times, most recently from ddf8bf3 to 32b35db Compare March 14, 2023 10:54
@hrydgard hrydgard force-pushed the basis-texture-compression-support branch from 32b35db to 6d520d6 Compare March 14, 2023 10:55
@hrydgard hrydgard marked this pull request as ready for review March 14, 2023 10:59
@hrydgard hrydgard merged commit 8e5825b into master Mar 14, 2023
@hrydgard hrydgard deleted the basis-texture-compression-support branch March 14, 2023 13:22
Saramagrean added a commit to Saramagrean/TKD_KWM-HD-Texture-Pack that referenced this pull request Mar 18, 2023
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.

1 participant