KTX2Loader: Add support for BC4, BC5 #31713
Merged
+60
−24
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.
Adds KTX2Loader support for BC4 (R) and BC5 (RG). Fixes a typo in WebGLRenderer previously causing BC4 textures to fail. Adds samples for both in
webgl_loader_texture_ktx2.html
.I'm a little confused why the BC5 source image below...
... appears in compressed form with green text, rather than black text. But I tried two tools with the same result, so I'm guessing there's something about the format itself I don't understand. A common use case for BC5 would be RG normal maps, as in #31695.