Looking at the docs and source, im not seeing that WebP is supported by Babylon Native. Just want to confirm this and if so wondering if this is on the roadmap? @bghgary @thomlucc
Also, could ya’ll point me to where the textureLoader decodes the webp on the JS side in normal BJS?
This is correct. We don’t support any other formats other than jpg and png at the moment. Support for other texture loaders (ktx, webp, etc.) is definitely something we need to do. @thomlucc Let’s make sure it’s in the backlog.
WebP is directly supported by the browser, like PNG and JPG, so there is no code to decode it.
Babylon 8 being around the corner, it is now added to the Babylon 9 backlog: Add support for more texture formats · Issue #1479 · BabylonJS/BabylonNative · GitHub
Thanks all. Im curious on the Native side where does all the texture loading occur? We could possibly take a stab at implementing this and contributing. I guess I should take a look anyway. But seems we can use libwebp to do the decoding on the Native side and just need to figure out the correct entry point.
It’s all in NativeEngine.cpp right now. We don’t currently use texture loaders at all. It’s all bypassed at the moment. To do this right will require changes to Babylon.js and Babylon Native to make sure they are using texture loaders somehow. I don’t know how easy it would be to do this.