Skip to content

KTX2Loader: Support ETC2, BCn, and ASTC 4x4 sRGB#31155

Merged
Mugen87 merged 9 commits intomrdoob:devfrom
donmccurdy:feat/ktx2loader-compressed-formats
May 27, 2025
Merged

KTX2Loader: Support ETC2, BCn, and ASTC 4x4 sRGB#31155
Mugen87 merged 9 commits intomrdoob:devfrom
donmccurdy:feat/ktx2loader-compressed-formats

Conversation

@donmccurdy
Copy link
Collaborator

@donmccurdy donmccurdy commented May 23, 2025

Updates KTX2Loader to support more GPU compression formats, and replaces the existing KTX2 example.

The new example should be better at explaining and testing the available KTX2 compression types. I've updated all previous .ktx2 sample files. The new textures are much smaller, each only 1-8kb, see https://github.com/donmccurdy/KTX2-Samples. Samples cover common formats, with "srgb" and "srgb-linear" color spaces. If the general approach looks OK, future PRs can extend the example to include array textures, cube textures, 3D textures, and perhaps other color spaces.

Preview

ktx2_preview

@mrdoob mrdoob added this to the r177 milestone May 26, 2025
@donmccurdy
Copy link
Collaborator Author

Had to remove the KTX2 example from the E2E list, unfortunately. The failure is caused by different font rendering, nothing to do with the WebGL canvas:

macOS
webgl_loader_texture_ktx2-expected

Linux
webgl_loader_texture_ktx2-actual

@mrdoob
Copy link
Owner

mrdoob commented May 27, 2025

Meh, some day we'll figure out the E2E system...

@Mugen87 Mugen87 merged commit a5a4983 into mrdoob:dev May 27, 2025
11 checks passed
@donmccurdy donmccurdy deleted the feat/ktx2loader-compressed-formats branch May 27, 2025 23:48
RuthySheffi pushed a commit to RuthySheffi/three.js that referenced this pull request Jun 5, 2025
* KTX2Loader: Support .setPath()

* KTX2Loader: Add compressed formats

* Examples: Organize KTX2 example in sections

* update examples, fix missing formats

* clean up

* clean up

* clean up

* remove unused textures

* remove ktx2 example from E2E :(
RuthySheffi pushed a commit to RuthySheffi/three.js that referenced this pull request Jun 5, 2025
* KTX2Loader: Support .setPath()

* KTX2Loader: Add compressed formats

* Examples: Organize KTX2 example in sections

* update examples, fix missing formats

* clean up

* clean up

* clean up

* remove unused textures

* remove ktx2 example from E2E :(
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

Successfully merging this pull request may close these issues.

3 participants