-
Notifications
You must be signed in to change notification settings - Fork 0
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
Use a custom phase instead of the main_opaque_3d phase. #1
base: bevy-0.13
Are you sure you want to change the base?
Conversation
fn sort(items: &mut [Self]) { | ||
// Key negated to match reversed SortKey ordering | ||
items.sort_by_key(|item| item.sort_key()); | ||
// radsort::sort_by_key(items, |item| -item.distance); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Iirc radsort is faster for this (it's what bevy used before), and bevy already depends on it, but it isn't re-exported. Probably fine to just add it as a crate level dependency if adding a new pipeline is the right way forward.
I'll pull the toggle fps controller in the examples changes out and resubmit them as a pr upstream. It was just annoying me when I was checking that this worked properly when mixed with regular opaque draws. I think everything else is required to get this running though. |
I wasn't sure if it was possible to get vertex pulling working with bevy's 0.13's
Opaque3d
pass, so I just re-implements bevy's old (0.12)Opaque3d
phase as a custom render pass (calledAabbOpaque3d
) that's ordered before bevy's newOpaque3d
pass. Performance wise I'd expect this to be very slightly slower since it's running 1 additional pass, and there'll be some overdraw over the AABBs if you're mixing regular bevy draws with AABBs (though since the AABB pass is before theOpaque3d
you'll avoid overdraw where anOpaque3d
objects is behind an AABB object).I also fixed the bloom example.
edit: The bloom example may need its values cranked up or exposure change, I haven't compared it to what it looked like previously but bevy's lighting tends to require much higher values in 0.13.