The code to reproduce the bug is very simple.
Here’s a reproduction: Babylon.js Playground (babylonjs.com)
new BABYLON.Texture("asdf", scene, {
format: BABYLON.Constants.TEXTUREFORMAT_RGB,
onError: (message, exception) => {
console.log(message, exception);
}
});
In fact, it’s a bit ambiguous to even call it a bug.
Let me explain.
- attempting to load a texture from the invalid texture url “asdf”.
- the texture load fails and attempts to load a fallback texture.
- TEXTUREFORMAT_RGB is a format not supported by WebGPU, try to load fallback texture using it.
- fallback texture loading fails.
You might think that this is not a bug and that this is the intended behavior. However, what actually happened is different from the logged text.
see:
I think it should force the texture format to be compatible when loading fallback textures, or at least log that the fallback texture is not being loaded.