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

Play nice with other 2d renderers through RenderPhase<Transparent2d>? #15

Closed
johanhelsing opened this issue Nov 21, 2023 · 6 comments
Closed

Comments

@johanhelsing
Copy link

Wondering if it's completely out of the question to play nice with other bevy 2d renderers, such as bevy_sprite and bevy_smud?

https://github.com/johanhelsing/bevy_smud/blob/66d9249f33996b1c8d9ee2aee20b783ecdefa8ee/src/lib.rs#L593

@simbleau
Copy link
Member

Wondering if it's completely out of the question to play nice with other bevy 2d renderers, such as bevy_sprite and bevy_smud?

https://github.com/johanhelsing/bevy_smud/blob/66d9249f33996b1c8d9ee2aee20b783ecdefa8ee/src/lib.rs#L593

I haven't used bevy_sprite or smud but nothing will stop you from using bevy-vello. It can use the same GPU device and you can spawn your assets with a transform.

Not sure if this answers the question, please let me know.

@johanhelsing
Copy link
Author

johanhelsing commented Nov 22, 2023

It's mainly about z ordering of transparents. The line i linked to will break a batch if something it doesn't recognize appears in the render phase,

@simbleau
Copy link
Member

Since bevy-vello was originally developed for a top-down game, it used the Y position in the transform for its Z-ordering, with the addition of layering. This is something we want to change in favor of Z-ordering, tracked by #8

Since Assetsv2 just came out, I'll look into both Z-ordering and ensuring it could play nicely with smud.

@simbleau simbleau added the question Further information is requested label Dec 23, 2023
@simbleau
Copy link
Member

@johanhelsing Now Z-ordering is implemented with help from @pengiie! There should be no issues. Let me know how it all works!

@simbleau simbleau removed the question Further information is requested label Dec 27, 2023
@seabassjh
Copy link
Collaborator

It's mainly about z ordering of transparents. The line i linked to will break a batch if something it doesn't recognize appears in the render phase,

Is there currently a problem when using bevy_vello regarding that line you linked? Or is this a precautionary question?

@johanhelsing
Copy link
Author

Hey sorry, didn't have time to get back to you back in december, but I tested a couple of weeks back and I think z-ordering worked as expected then.

Thanks! Hoping to use this crate in a project soon :)

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

No branches or pull requests

3 participants