-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Divide the single VisibleEntities
list into separate lists for 2D meshes, 3D meshes, lights, and UI elements, for performance.
#12582
Merged
superdump
merged 16 commits into
bevyengine:main
from
pcwalton:segregated-visible-entities
Apr 11, 2024
Merged
Divide the single VisibleEntities
list into separate lists for 2D meshes, 3D meshes, lights, and UI elements, for performance.
#12582
superdump
merged 16 commits into
bevyengine:main
from
pcwalton:segregated-visible-entities
Apr 11, 2024
Commits on Mar 19, 2024
-
Divide the single
VisibleEntities
list into separate lists for 2Dmeshes, 3D meshes, and lights, for performance. This commit splits `VisibleEntities::entities` into three separate lists: one for lights, one for 2D meshes, and one for 3D meshes. This allows `queue_material_meshes` and similar methods to avoid examining entities that are obviously irrelevant. In particular, this separation helps scenes with many skinned meshes, as the individual bones are considered visible entities but have no rendered appearance. Internally, `VisibleEntities::entities` is a `HashMap` from the `TypeId` representing a `QueryFilter` to the appropriate `Entity` list. I had to do this because `VisibleEntities` is located within an upstream crate from the crates that provide lights (`bevy_pbr`) and 2D meshes (`bevy_sprite`). As an added benefit, this setup allows apps to provide their own types of renderable components, by simply adding a specialized `check_visibility` to the schedule. Currently, this provides minimal performance benefit in `many_foxes`, but on top of binning (bevyengine#12453) it provides a 20% end-to-end speedup on that benchmark. * `check_visibility` and `VisibleEntities` now store the three types of renderable entities--2D meshes, 3D meshes, and lights--separately. If your custom rendering code examines `VisibleEntities`, it will now need to specify which type of entity it's interested in using the `WithMesh2d`, `WithMesh`, and `WithLight` types respectively. If your app introduces a new type of renderable entity, you'll need to add an explicit call to `check_visibility` to the schedule to accommodate your new component or components.
Configuration menu - View commit details
-
Copy full SHA for b225d52 - Browse repository at this point
Copy the full SHA b225d52View commit details
Commits on Mar 20, 2024
-
Configuration menu - View commit details
-
Copy full SHA for a6ffc08 - Browse repository at this point
Copy the full SHA a6ffc08View commit details -
Configuration menu - View commit details
-
Copy full SHA for 958de2b - Browse repository at this point
Copy the full SHA 958de2bView commit details -
Configuration menu - View commit details
-
Copy full SHA for 3cbb44a - Browse repository at this point
Copy the full SHA 3cbb44aView commit details -
Configuration menu - View commit details
-
Copy full SHA for aeee618 - Browse repository at this point
Copy the full SHA aeee618View commit details -
Configuration menu - View commit details
-
Copy full SHA for 4866699 - Browse repository at this point
Copy the full SHA 4866699View commit details
Commits on Mar 26, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 0212fcf - Browse repository at this point
Copy the full SHA 0212fcfView commit details
Commits on Mar 31, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 8daaafd - Browse repository at this point
Copy the full SHA 8daaafdView commit details -
Configuration menu - View commit details
-
Copy full SHA for 253cb25 - Browse repository at this point
Copy the full SHA 253cb25View commit details -
Configuration menu - View commit details
-
Copy full SHA for 2f2fbc7 - Browse repository at this point
Copy the full SHA 2f2fbc7View commit details -
Configuration menu - View commit details
-
Copy full SHA for 2e40d1e - Browse repository at this point
Copy the full SHA 2e40d1eView commit details
Commits on Apr 1, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 1a60ba8 - Browse repository at this point
Copy the full SHA 1a60ba8View commit details -
Configuration menu - View commit details
-
Copy full SHA for 046d6b5 - Browse repository at this point
Copy the full SHA 046d6b5View commit details
Commits on Apr 11, 2024
-
Configuration menu - View commit details
-
Copy full SHA for fb57cef - Browse repository at this point
Copy the full SHA fb57cefView commit details -
Configuration menu - View commit details
-
Copy full SHA for deb3de4 - Browse repository at this point
Copy the full SHA deb3de4View commit details -
Configuration menu - View commit details
-
Copy full SHA for 626fba3 - Browse repository at this point
Copy the full SHA 626fba3View commit details
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.