-
-
Notifications
You must be signed in to change notification settings - Fork 35.9k
WebGPURenderer: Persistent video texture approach #31416
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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_external
with a persistent texture usingcopyExternalImageToTexture()
updating byrequestVideoFrameCallback
ofVideoTexture
, 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.