Igalia / wolvic

A fast and secure browser for standalone virtual-reality and augmented-reality headsets.
https://wolvic.org
Mozilla Public License 2.0
829 stars 106 forks source link

Support KTX v2 #782

Open javifernandez opened 1 year ago

javifernandez commented 1 year ago

Is your feature request related to a problem? Please describe. Some Khronos tools like 'tktx' provide new capabilities to convert different image formats to KTX, However, most of the options and parameters imply generating KTX V2 signatures. Currently Wolvic requires textures in KTX v1.

Describe the solution you'd like

Describe alternatives you've considered It's still possible to us other conversion tools that enforce KTX v1.

Additional context KTX v1 spec - https://registry.khronos.org/KTX/specs/1.0/ktxspec.v1.html KTX v2 spec - https://registry.khronos.org/KTX/specs/2.0/ktxspec.v2.html

svillar commented 1 year ago

Where is that dependency in Wolvic? I mean, where is the part in which we require v1? I don't remember having specific code for that...

javifernandez commented 1 year ago

Where is that dependency in Wolvic? I mean, where is the part in which we require v1? I don't remember having specific code for that...

https://github.com/Igalia/vrb/blob/e16bd5dd4842ddad0bb5502969b3d80c048c86e8/android/java/org/mozilla/vrb/ktx/KTXTexture.java#L51

HollowMan6 commented 1 year ago

Tried to implement KTX v2 spec: 470beea4187881fc477bfc45a915b541a374ad7d.patch.txt

https://github.com/HollowMan6/vrb/blob/470beea4187881fc477bfc45a915b541a374ad7d/android/java/org/mozilla/vrb/ktx/KTXTextureV2.java And then I realized that we actually have several issues if we want to support it here:

So instead of reinventing the wheels, maybe we want to find some library that parses the KTX2 format here.