-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support KTX2 texture #4771
Comments
May I ask which version of the features of ktx2 is planned to support?😊 |
We intend to fully support |
very good feature👍. have you started developing this feature? |
Looking forward to the support of ktx2. Recently, we are also try to using ktx2 texture in our project through filament. |
Looking forward to the support of ktx2. +1s |
mipgen can now emit basis-encoded KTX2 files. Both the desktop and web "suzanne" samples use this as a test for compressed textures. This PR does not add KTX2 support to glTF, but it's on the way. `BasisEncoder` has a builder style API that calls the basis encoder to create KTX2 files. This hides some low-level BasisU features that we are not using, like file I/O and mipmap generation. `Ktx2Reader` is an easy-to-use API for creating Filament textures from KTX2 files. Its API primarily consists of these two methods: bool requestFormat(Texture::InternalFormat format); Filament::Texture* load(const uint8_t* data, size_t size); The first method is used to build an ordered list of formats that are supported by your hardware. The second method consumes the contents of a basis-encoded KTX2 file and attempts to produce a Filament texture with a preferred format. IMPORTANT: Our tools still let you use KTX1 for non-compressed images because it is useful for HDR, but you can no longer use KTX1 for block-compressed data. Partial fix for #4771.
mipgen can now emit basis-encoded KTX2 files. Both the desktop and web "suzanne" samples use this as a test for compressed textures. This PR does not add KTX2 support to glTF, but it's on the way. `BasisEncoder` has a builder style API that calls the basis encoder to create KTX2 files. This hides some low-level BasisU features that we are not using, like file I/O and mipmap generation. `Ktx2Reader` is an easy-to-use API for creating Filament textures from KTX2 files. Its API primarily consists of these two methods: bool requestFormat(Texture::InternalFormat format); Filament::Texture* load(const uint8_t* data, size_t size); The first method is used to build an ordered list of formats that are supported by your hardware. The second method consumes the contents of a basis-encoded KTX2 file and attempts to produce a Filament texture with a preferred format. IMPORTANT: Our tools still let you use KTX1 for non-compressed images because it is useful for HDR, but you can no longer use KTX1 for block-compressed data. Partial fix for #4771.
mipgen can now emit basis-encoded KTX2 files. Both the desktop and web "suzanne" samples use this as a test for compressed textures. This PR does not add KTX2 support to glTF, but it's on the way. `BasisEncoder` has a builder style API that calls the basis encoder to create KTX2 files. This hides some low-level BasisU features that we are not using, like file I/O and mipmap generation. `Ktx2Reader` is an easy-to-use API for creating Filament textures from KTX2 files. Its API primarily consists of these two methods: bool requestFormat(Texture::InternalFormat format); Filament::Texture* load(const uint8_t* data, size_t size); The first method is used to build an ordered list of formats that are supported by your hardware. The second method consumes the contents of a basis-encoded KTX2 file and attempts to produce a Filament texture with a preferred format. IMPORTANT: Our tools still let you use KTX1 for non-compressed images because it is useful for HDR, but you can no longer use KTX1 for block-compressed data. Partial fix for #4771.
mipgen can now emit basis-encoded KTX2 files. Both the desktop and web "suzanne" samples use this as a test for compressed textures. This PR does not add KTX2 support to glTF, but it's on the way. `BasisEncoder` has a builder style API that calls the basis encoder to create KTX2 files. This hides some low-level BasisU features that we are not using, like file I/O and mipmap generation. `Ktx2Reader` is an easy-to-use API for creating Filament textures from KTX2 files. Its API primarily consists of these two methods: bool requestFormat(Texture::InternalFormat format); Filament::Texture* load(const uint8_t* data, size_t size); The first method is used to build an ordered list of formats that are supported by your hardware. The second method consumes the contents of a basis-encoded KTX2 file and attempts to produce a Filament texture with a preferred format. IMPORTANT: Our tools still let you use KTX1 for non-compressed images because it is useful for HDR, but you can no longer use KTX1 for block-compressed data. Partial fix for #4771.
mipgen can now emit basis-encoded KTX2 files. Both the desktop and web "suzanne" samples use this as a test for compressed textures. This PR does not add KTX2 support to glTF, but it's on the way. `BasisEncoder` has a builder style API that calls the basis encoder to create KTX2 files. This hides some low-level BasisU features that we are not using, like file I/O and mipmap generation. `Ktx2Reader` is an easy-to-use API for creating Filament textures from KTX2 files. Its API primarily consists of these two methods: bool requestFormat(Texture::InternalFormat format); Filament::Texture* load(const uint8_t* data, size_t size); The first method is used to build an ordered list of formats that are supported by your hardware. The second method consumes the contents of a basis-encoded KTX2 file and attempts to produce a Filament texture with a preferred format. IMPORTANT: Our tools still let you use KTX1 for non-compressed images because it is useful for HDR, but you can no longer use KTX1 for block-compressed data. Partial fix for #4771.
This was fixed a few weeks ago, forgot to close the ticket. |
@prideout Thank you for support KTX2 But I found that it is not working in filament 1.22.0 Not working in filament web viewer macOS Monterey 12.3.1(21E258) |
Correct, it is supported on main only. The final commit for this feature landed on May 2 with f035655, so it should arrive with v1.22.1 |
Thank you for supporting this feature. |
Is your feature request related to a problem? Please describe.
Filament can't render GLB/GLTB file containing KTX2 texture.
The explanation of KTX2 is in Khronos group website.
Examples GLB files containing KTX2.
Describe the solution you'd like
I wish filament supports to render KTX2 texture. KTX2 is really nice for rendering quality and compression 3D file.
Describe alternatives you've considered
cgltf.h: This line means GLB with ktx2 texture convert to
basisu_image
notimage
.AssetLoader.cpp: This line means
basisu_image
can't load to render.Accept
basisu_image
in AssetLoader.Testing in filament viewer between GLB(with png) and GLB(with KTX2)

OS and backend
macOS Big Sur 11.6
Chrome 95.0.4638.54 (x86_64)
Thank you for @codpot's help.
The text was updated successfully, but these errors were encountered: