Skip to content
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

Implement video texture support for WebGPU #5691

Open
mvaligursky opened this issue Sep 28, 2023 · 1 comment
Open

Implement video texture support for WebGPU #5691

mvaligursky opened this issue Sep 28, 2023 · 1 comment
Assignees
Labels
area: graphics Graphics related issue feature request

Comments

@mvaligursky
Copy link
Contributor

mvaligursky commented Sep 28, 2023

WebGL can play video textures, and we need to implement support for this for WebGPU.

https://playcanvas.github.io/#/graphics/video-texture

See the video section here: https://toji.dev/webgpu-best-practices/img-textures.html

As this needs to use a custom sampling instruction, it might be difficult to use video texture directly from the external texture, which would be the best performance. This instruction might not be available with our GLSL->WGSL compilation. Instead, we might write a custom WGSL shader, which copies the external texture, and from then on it can be used as any other texture. The extra cost here would be the additional copy.

@mvaligursky
Copy link
Contributor Author

A solution with a video -> normal texture copy is done here: #6280
This matches our WebGL implementation.

This issue stays open, we we'd like to have a solution that avoids the copy, which is possible on WebGPU using WGSL shaders.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: graphics Graphics related issue feature request
Projects
None yet
Development

No branches or pull requests

1 participant