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

Transparency example (PR only) #804

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

DJMcNab
Copy link
Member

@DJMcNab DJMcNab commented Jan 29, 2025

Demonstration of how you'd get transparency with #803.

I'm not planning to merge this, because I don't think that this should be part of utils. However, I'm happy for someone to want to make the follow-up of making this configurable (cc @TheNachoBIT), if they still want to use utils and have a transparent surface render. OTOH, #801 is for a different use case, which I would argue should just use a custom TextureBlitter.

Replace with blitting/surface utilities in the `utils` module.
@DJMcNab DJMcNab changed the title Transparency Transparency example Jan 29, 2025
@DJMcNab DJMcNab changed the title Transparency example Transparency example (PR only) Jan 29, 2025
@DJMcNab DJMcNab force-pushed the transparency branch 2 times, most recently from 2036ac9 to ae54187 Compare January 29, 2025 14:03
@nicoburns
Copy link
Contributor

My use case for this would be rendering a Vello scene such that it could then be composited on top of some other wgpu generated texture such that the other content "shows through" where the Vello scene is entirely transparent.

More concretely the use case I am imagining is something like rendering UI in Blitz on top of gpu-rendered content generated by something like bevy or custom wgpu rendering code. This could be useful for game UI, and it could also be useful for applications like Figma / Graphite / CAD that want standard widgets for their control UI but custom drawing for the "content".

Would the approach in this PR be suitable for that?

@DJMcNab
Copy link
Member Author

DJMcNab commented Feb 3, 2025

Sure, I believe so. You'd want the texture you're using for compositing to have the RENDER_ATTACHMENT usage.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants