Skip to content

Custom wgpu rendering #185

Open
Open
@nicoburns

Description

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?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions