bevy/crates/bevy_pbr
Patrick Walton 5b746d2b19
Pack the StandardMaterialKey into a single scalar instead of a structure. (#12783)
This commit changes the `StandardMaterialKey` to be based on a set of
bitflags instead of a structure. We hash it every frame for every mesh,
and `#[derive(Hash)]` doesn't generate particularly efficient code for
large structures full of small types. Packing it into a single `u64`
therefore results in a roughly 10% speedup in `queue_material_meshes` on
`many_cubes --no-frustum-culling`.

![Screenshot 2024-03-29
075124](https://github.com/bevyengine/bevy/assets/157897/78afcab6-b616-489b-8243-da9a117f606c)
2024-03-29 18:34:27 +00:00
..
src Pack the StandardMaterialKey into a single scalar instead of a structure. (#12783) 2024-03-29 18:34:27 +00:00
Cargo.toml Meshlet rendering (initial feature) (#10164) 2024-03-25 19:08:27 +00:00