playcanvas / playcanvas/engine
Implement video texture support for WebGPU
@mvaligursky is already working on this.
Since Sep 28, 2023.
- Dominant language
- JavaScript
- Stars
- 16.8k
- Forks
- 2k
- Avg merge
- 4h 32m
- Merged PRs (30d)
- 222
Description
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.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.