Hey everyone,
we are switching our project to WebGPU and ran into one issue: We are dynamically importing textures from svg strings, which works perfectly using the WebGL engine. However, when switching to WebGPU, the texture is not loaded anymore. Did anyone run into the same problem and maybe found a solution?
Here is our small example, just switch to WebGPU and the image won’t be loaded anymore:
Seems like createImageBitmap fails with a DOMException (image could not be decoded). @Evgeni_Popov - anything you can think of that will make it work?
createImageBitmap
does not support a blob url that contains svg data.
As a workaround, you can create an ImageBitmap
from a HTML image element, and pass the bitmap to Texture.updateURL
:
1 Like
Alright, I get the issue - thanks a lot for your help, the workaround is working like a charm!