Support for KHR_texture_basisu in bevy-gltf#24380
Closed
mholiv wants to merge 2 commits into
Closed
Conversation
Contributor
Author
|
This was tested on my local machine and I could load strictly correct gltf files with basisu textures |
Contributor
|
looks like the ci failure is just some clippy lints at the moment |
Contributor
|
this will also need to be targeted at the main branch instead of release-0.19.0 |
Contributor
Author
|
This was replaced by #24397 24397 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Objective
At this time fully spec complaint gltf files with universal-basisu textures are not loadable in bevy. This PR fixes that by introducing the concept of document image indies.
We add some indies infrastructure and use that to check for basisu as per the spec and prefer it over the native (i.e. strictly png and jpeg) texture.
We also allow for no native gltf texture while we have a universal-basisu texture.
This approach is, can be expanded to allow for the correct parsing of
EXT_texture_webpandMSFT_texture_dds(auto rejected it when presented by upstream gltf-rs)This PR is scoped to strictly fix basisu. A trivial patch could be submitted building on this work to fully correctly parse webp as per the
EXT_texture_webpspec.Background
Right now we can parse gltf files with webp and basisu textures but only if we deviate from the specification. This patch does not act on that.
This patch allows bevy to parse strictly complaint gltfs in addition to how we handle them now.