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

Custom wgpu rendering #185

Open
nicoburns opened this issue Feb 14, 2025 · 0 comments
Open

Custom wgpu rendering #185

nicoburns opened this issue Feb 14, 2025 · 0 comments
Labels
enhancement New feature or request

Comments

@nicoburns
Copy link
Collaborator

This issue tracks the ability to render custom content (rendered with wgpu) into a Blitz scene.

Notes

  • The Vello renderer allows for a custom wgpu texture to be rendered in a Vello scene using: https://docs.rs/vello/latest/vello/struct.Renderer.html#method.override_image. To use this API, one creates a dummy peniko::Image of the correct dimensions, call this API with the texture you wish to use. You can then render the texture by drawing calling Scene::draw_image with the dummy image (yes this API is dumb, but it works so 🤷 )
  • We need to work out an API for how to do it. The web typically uses the <canvas> element for custom rendered content. It would probably make sense for us to do the same here. Either the <canvas> element should own a wgpu Texture and we need some way to get a reference to it. Or we should crate our own wgpu texture, and we need to some way to pass it to the <canvas> - probably makes sense for the <canvas> to own the texture?
@nicoburns nicoburns added the enhancement New feature or request label Feb 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant