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

Merged
merged 2 commits into from
Feb 7, 2025

Conversation

msvbg
Copy link
Contributor

@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
Contributor 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.

@simbleau
Copy link
Member

simbleau commented Feb 4, 2025

Would you mind rebasing now that the bevy 0.15 upgrade is complete?

@msvbg msvbg force-pushed the require-vello-view-marker branch from 6e2f705 to 6a5f399 Compare February 7, 2025 16:48
@msvbg
Copy link
Contributor Author

msvbg commented Feb 7, 2025

Done! It looks like the cube3d example no longer works, probably due to #93?

Copy link
Member

@simbleau simbleau left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great! Will merge soon.

@simbleau simbleau enabled auto-merge February 7, 2025 18:00
@simbleau simbleau added this pull request to the merge queue Feb 7, 2025
Merged via the queue into linebender:main with commit ae22d3c Feb 7, 2025
3 checks passed
@msvbg msvbg deleted the require-vello-view-marker branch February 8, 2025 15:08
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