KTX2Loader: Support ZSTD-compressed DataTexture and DataTexture3D #24398
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.
Allows KTX2Loader to support ZSTD-compressed DataTexture and DataTexture3D with raw formats (u8, f16, f32).
I have also removed the UMD build,
examples/js/KTX2Loader.js
. At this point it would depend on three globals — WorkerPool, KTX, and ZSTDDecoder — which is starting to feel excessive. Originally it was added to help get support in A-Frame (aframevr/aframe#4919) but this hasn't happened, and I think it may be easier just to make a custom KTX2Loader build for A-Frame if necessary.This type of compression is quite useful for things like LUTs — the table below shows example sizes for a typical 65x65x65 3D LUT texture.
/cc @drcmda