PlayCanvas demos break when using video elements as `copyExternalImageToTexture`
Categories
(Core :: Graphics: WebGPU, defect, P3)
Tracking
()
People
(Reporter: ErichDonGubler, Unassigned)
References
(Depends on 1 open bug, Blocks 1 open bug)
Details
Steps to reproduce
-
Open a demo that uses a video for a part of its rendering in WebGPU, such as https://playcanvas.vercel.app/#/graphics/reflection-box. Observe that the rendering halts on the first frame, with some parts obviously rendered incorrectly when compared to Chrome.
-
Open the developer console. Observe the following console log error entry:
Uncaught TypeError: GPUQueue.copyExternalImageToTexture: 'source' member of GPUCopyExternalImageSourceInfo could not be converted to any of: ImageBitmap, HTMLImageElement, HTMLCanvasElement, OffscreenCanvas.
| Reporter | ||
Comment 1•1 year ago
|
||
An exhaustive list of demos in which this breaks things:
Comment 2•6 months ago
|
||
I've run into this same problem in spark.js my workaround is to create an ImageBitmap for each VideoFrame, but presumably this adds some overhead and is only required for Firefox. Other browsers support VideoFrame as a source argument, and so does Firefox in the gl.texImage2D code path.
| Reporter | ||
Comment 3•6 months ago
|
||
Ignacio: You can follow along with progress for VideoFrame specifically with bug 1922100. Would you please file a bug noting that spark.js is blocked on that? 🙏🏻🥺
Doing a bit of debugging, this particular bug is blocked on HTMLVideoElement, which is bug 1922098.
Comment 4•6 months ago
|
||
Will do, thanks!
Comment 5•10 days ago
|
||
Hi, this bug blocks enabling WebGPU-based rendering for Figma when running in Firefox. We're interested in getting WebGPU support rolled out to more browsers so would appreciate a fix!
Description
•