BabylonJS / Babylon.js

Babylon.js is a powerful, beautiful, simple, and open game and rendering engine packed into a friendly JavaScript framework.
http://www.babylonjs.com
Apache License 2.0
23.17k stars 3.42k forks source link

libktx needs to be updated to follow latest spec changes #8483

Closed zeux closed 4 years ago

zeux commented 4 years ago

KTX specification rc1 (https://github.khronos.org/KTX-Specification/, 2020-05-26) removed globalFlags from supercompression global data for BasisU.

This makes all existing KTX2 files incompatible, and accordingly requires an update to libktx to load them; currently valid (as per new spec) files fail to load with:

ERROR: Failed to transcode: File data is inconsistent with KTX spec.

Attaching a sample file which loads correctly in three.js after https://github.com/mrdoob/three.js/pull/19791

rubyrose.glb.zip

sebavan commented 4 years ago

Adding @bghgary to upgrade

bghgary commented 4 years ago

I've been looking at this for a bit. There are issues with the latest version of libktx.js/wasm where the GL object is not exposed for some reason. Still investigating with Mark, but this might take a bit of time.

bghgary commented 4 years ago

Turns out the new build in KTX-Software is causing an issue. The old build is still there, so I was able to create a build using that with Mark's help.