-
-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Recompute AABBs #18742
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
base: main
Are you sure you want to change the base?
Recompute AABBs #18742
Conversation
…on to avoid component insertion where mutation is possible.
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.
Ooohh, this is such a nice longstanding issue to fix, really confused me the first time I hit it. So glad to see AssetChanged
helping here. There's probably a bit of perf hit for the table scan but I think this is such a sharp edge and PostUpdate
has a lot of noise anyway that I think it's totally worth it.
Agreed, but, I would expect entities with meshes is going to be a pretty manageable number, and would likely be render bottlenecked first. (could be wrong!) |
That reminds me, let's make the mutation queries go brrrrr |
Looks like this I open, need to review why: #7971 The notable bit:
|
.before(CheckVisibility) | ||
.after(TransformSystem::TransformPropagate) | ||
.after(AssetEvents) | ||
.ambiguous_with(CalculateBounds), |
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.
What does it mean to be ambiguous with itself?
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.
Ignore all ambiguities between systems in the same set.
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.
Code looks good, might need an opt-out just to be on the safe side.
The previous versions of this seemed to suffer from various performance issues but they also didn't have access to AssetChanged
that allows for such a simple implementation.
We should bench this before merging, but I'm inclined to merge even with a modest regression. This is a really nasty bug, and "fast but incorrect" really isn't very useful. |
As far as I can tell, with this setup, meshes spawned with |
Yep. There are a few ways we could solve this, I don't know if we have precedent for any. The closest I can think of is something like an opt-out ZST like There is no way to tell if a newly added |
Objective
Solution
Testing