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

Skipping mipmaps when loading from disk #901

Closed
Flone-dnb opened this issue Apr 25, 2024 · 2 comments
Closed

Skipping mipmaps when loading from disk #901

Flone-dnb opened this issue Apr 25, 2024 · 2 comments

Comments

@Flone-dnb
Copy link

Hello, is there a way to skip some mips when loading a texture from disk? Consider an example where I want to load a texture that has 3 mipmaps with sizes:

  • mip0 - 1024
  • mip1 - 512
  • mip2 - 256

but I only want to load 2 of them (skip the largest mipmap with size 1024 and don't load it into the memory) so that my final (loaded) texture will only have 2 mips with sizes 512 and 256.

I'm currently using ktxTexture_CreateFromNamedFile and ktxTexture_VkUploadEx_WithSuballocator to load textures.

Thanks.

@MarkCallow
Copy link
Collaborator

VkUpload does not provide any control over loading only some of your mipmaps. I will be happy to accept a PR to add this functionality should your need motivate you to add the functionality.

@Flone-dnb
Copy link
Author

So after spending a few hours trying to implement this feature I eventually gave up on it and just copied the loaded texture to a new one but skipped required mips. It's not a good solution but it satisfies me for now. Thanks for the info anyway.

Feel free to close this issue.

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

2 participants