WebGPURenderer: Persistent video texture approach#31416
Conversation
📦 Bundle sizeFull ESM build, minified and gzipped.
🌳 Bundle size after tree-shakingMinimal build including a renderer, camera, empty scene, and dependencies.
|
|
Yes, that sounds like a good solution 👍 . Are parts of the PR missing though? I don't see any changes to |
|
Great, right? The current texture system was reused, and most things worked auto-magically. |
|
Ah I see, the code goes now in the |
|
It seems this PR broke |
|
This introduced copy overheads that would be hamstringed by LPDDR bandwidth in mobiles. |
@greggman We were hoping to simplify our code base by not using Does this approach via |
I'm not really sure how to define "performance issue" 😛 copying is slower than not copying. In Chrome, if you enable
|
|
Then I would say we keep the status quo and see how it performs in production. Maintaining a separate code path for video textures in the WebGPU backend was a bit of a pain and the new approach is so much more elegant. |
Closes #31330, #31397
Description
Replaces
texture_externalwith a persistent texture usingcopyExternalImageToTexture()updating byrequestVideoFrameCallbackofVideoTexture, reusing all of the core's texture management, including sharing between materials, and adds support for vertex stage usage too.@Mugen87 I think this is the best way, in addition to the benefits, it reduces the total code.