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

astc encoding lost normal-mode #813

Open
wasimabbas-arm opened this issue Dec 4, 2023 · 4 comments
Open

astc encoding lost normal-mode #813

wasimabbas-arm opened this issue Dec 4, 2023 · 4 comments

Comments

@wasimabbas-arm
Copy link
Contributor

wasimabbas-arm commented Dec 4, 2023

Since --normal-mode is only valid with ktx create --encode basis-lz | uastc there is no way to encode astc normals anymore. You will get;

ktx create fatal: Invalid use of argument --normal-mode that only applies to encoding.

If used with --format VK_FORMAT_ASTC_4x5_UNORM_BLOCK

@MarkCallow
Copy link
Collaborator

Clearly we need to have a think about how to support this for BasisU and ASTC. Anyone want to make a proposal?

@wasimabbas-arm
Copy link
Contributor Author

wasimabbas-arm commented Dec 4, 2023

Shouldn't this just requires removing the coupling of --normal-mode with --encode for ASTC.

Actually why are these linked in the first place? Why can't I make an uncompressed KTX2, 2-component normal texture? As long as I know its 2-components, compressed or not I can recreate the 3rd component in the shaders.

@MarkCallow
Copy link
Collaborator

Shouldn't this just requires removing the coupling

Yes . But should be make a normal_mode_utils.h with these options or duplicate them where needed. Almost certainly we should make a utils file even though there are only 2 options.

Actually why is this coupled in the first place?

Excellent question. We (I) just never thought about it. This started out as a way to get better results from block compression schemes.

@abbaswasim
Copy link
Contributor

Ok, how we implement them across different tools needs a bit of thinking. Agree collecting those into a norma_mode_utils.h makes sense.

If we are happy to have non-compressed normal mode normal map textures supported then un-linking from the --encode should immediately solve the ASTC issue. Of course the options needs to be traversed down into ASTC options for it to be used by the encoder.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants