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

Add labels to render systems #1511

Closed
wants to merge 2 commits into from

Conversation

alec-deason
Copy link
Member

This create a RenderSystem enum, symmetric with other bevy crates, and labels all the render systems with it. This represents incremental progress towards #1466

@alice-i-cecile alice-i-cecile added A-Rendering Drawing game state to the screen C-Usability A targeted quality-of-life change that makes Bevy easier to use labels Feb 24, 2021
Copy link
Member

@alice-i-cecile alice-i-cecile left a comment

Choose a reason for hiding this comment

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

Once the label / system name discrepancy I raised is solved this looks good to merge.

crates/bevy_render/src/lib.rs Outdated Show resolved Hide resolved
@alice-i-cecile alice-i-cecile added the S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it label Feb 24, 2021
@samnm
Copy link

samnm commented Mar 3, 2021

This seems to fix #1506

@alec-deason
Copy link
Member Author

If it does, it's probably a matter of accidentally perturbing system orders not an actual fix. The only behavior change this PR should have is to force the visible entities system to run after the camera systems, which I think would have become un-ordered in the post-0.4 changes. But I don't see how that would be related to #1506, maybe it is though.

@samnm
Copy link

samnm commented Mar 3, 2021

I could be wrong but I believe #1506 is caused by the new material not being loaded before it needs to be rendered, which ordering texture_resource_system correctly fixes.

@alec-deason
Copy link
Member Author

Hmm. But this shouldn't explicitly effect the order of that system. All it does is add a label to it so other systems can order themselves relative to it in the future.

@samnm
Copy link

samnm commented Mar 3, 2021

Oh yeah... I guess I just got lucky with the random ordering after I applied this PR. 🤷

@alec-deason
Copy link
Member Author

If we decide to go the same way with this PR as #1512 then I would really like it if we could keep the label on RenderSystem::VisibleEntities. I need some way to put Draws into the visible entity list for the camera which means I need to schedule around this system. Or maybe sit down with the rendering code and come up with a better solution, but adding stuff to visible entities was the easiest thing I could come up with.

@mockersf
Copy link
Member

mockersf commented Mar 4, 2021

Unlike #1512, this PR also add some ordering which is needed, it's not a case of "just label everything by default".

@cart
Copy link
Member

cart commented Mar 5, 2021

I think "visibility calculation" is core enough to render logic that allowing people to insert before/after makes sense to me. I sort of want to wait and see how "multiple labels" pans out, as its now looking like theres a chance it will make it into 0.5.

Can we make the labels in this pr private (and scoped only to things that need internal ordering), then prior to 0.5 we can make a pragmatic decision about label exports vs "multi-label" solutions?

@alec-deason
Copy link
Member Author

Ok, that makes sense. Can anyone give me some guidance on what needs internal ordering?

@cart
Copy link
Member

cart commented Mar 5, 2021

I'll need to dig in to it. I was planning on taking a pass over this stuff anyway. I wrote a lot of these systems, so its probably more efficient for me to just go through them.

@cart
Copy link
Member

cart commented Mar 14, 2021

Closing for now in favor of #1606. We can re-open or re-implement if we decide to label all internal systems.

@cart cart closed this Mar 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Rendering Drawing game state to the screen C-Usability A targeted quality-of-life change that makes Bevy easier to use S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants