KTX2Loader: Support ZSTD-compressed DataTexture and DataTexture3D#24398
Merged
mrdoob merged 1 commit intomrdoob:devfrom Aug 2, 2022
Merged
KTX2Loader: Support ZSTD-compressed DataTexture and DataTexture3D#24398mrdoob merged 1 commit intomrdoob:devfrom
mrdoob merged 1 commit intomrdoob:devfrom
Conversation
Owner
|
Thanks! |
Owner
/fyi @elalish |
Contributor
|
This is cool! Is there a tool for compressing a LUT into KTX2? |
Collaborator
Author
|
I don't have the ZSTD encoder working yet (use ktxsc to add compression in the meantime) but yeah, WIP: |
abernier
pushed a commit
to abernier/three.js
that referenced
this pull request
Sep 16, 2022
snagy
pushed a commit
to snagy/three.js-1
that referenced
this pull request
Sep 21, 2022
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.
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