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

Require a VelloView marker for cameras rendering Vello graphics #85

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

msvbg
Copy link

@msvbg msvbg commented Dec 4, 2024

It is common for Bevy cameras to mark what graphics features they use using a marker component, such as bloom or SSR, to name a few built-in effects that do this. In my game, I have cameras that don't need any Vello content at all. If I've read the logic correctly, they still pay the tax of running Vello code.

bevy_vello's render_frame system is currently the most demanding system in my game, and this PR seems to push it down to second place, although it is quite difficult to measure precisely.

Note that this is a breaking change, since users now have to add the VelloView component to their camera or nothing will render.

@msvbg
Copy link
Author

msvbg commented Dec 4, 2024

Turns out I was unnecessarily redrawing a bunch of static lines every frame. Fixing that solved my performance problems, but I think this PR is still a good change.

@simbleau
Copy link
Member

simbleau commented Dec 4, 2024

I'm in the middle of a bevy 0.15 refactor and will add your changes after the 0.15 upgrade. This might sit for a minute, apologies.

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