bevy/crates
Patrick Walton f5de3f08fb
Use multidraw for opaque meshes when GPU culling is in use. (#16427)
This commit adds support for *multidraw*, which is a feature that allows
multiple meshes to be drawn in a single drawcall. `wgpu` currently
implements multidraw on Vulkan, so this feature is only enabled there.
Multiple meshes can be drawn at once if they're in the same vertex and
index buffers and are otherwise placed in the same bin. (Thus, for
example, at present the materials and textures must be identical, but
see #16368.) Multidraw is a significant performance improvement during
the draw phase because it reduces the number of rebindings, as well as
the number of drawcalls.

This feature is currently only enabled when GPU culling is used: i.e.
when `GpuCulling` is present on a camera. Therefore, if you run for
example `scene_viewer`, you will not see any performance improvements,
because `scene_viewer` doesn't add the `GpuCulling` component to its
camera.

Additionally, the multidraw feature is only implemented for opaque 3D
meshes and not for shadows or 2D meshes. I plan to make GPU culling the
default and to extend the feature to shadows in the future. Also, in the
future I suspect that polyfilling multidraw on APIs that don't support
it will be fruitful, as even without driver-level support use of
multidraw allows us to avoid expensive `wgpu` rebindings.
2024-12-06 17:22:03 +00:00
..
bevy_a11y Remove accesskit re-export from bevy_a11y (#16257) 2024-11-08 21:01:16 +00:00
bevy_animation Deny derive_more error feature and replace it with thiserror (#16684) 2024-12-06 17:03:55 +00:00
bevy_app Deny derive_more error feature and replace it with thiserror (#16684) 2024-12-06 17:03:55 +00:00
bevy_asset Deny derive_more error feature and replace it with thiserror (#16684) 2024-12-06 17:03:55 +00:00
bevy_audio Update rodio requirement from 0.19 to 0.20 (#16359) 2024-12-03 17:55:42 +00:00
bevy_color Deny derive_more error feature and replace it with thiserror (#16684) 2024-12-06 17:03:55 +00:00
bevy_core Support on_thread_spawn and on_thread_destroy for TaskPoolPlugin (#13045) 2024-11-11 20:00:01 +00:00
bevy_core_pipeline Use multidraw for opaque meshes when GPU culling is in use. (#16427) 2024-12-06 17:22:03 +00:00
bevy_derive move ANDROID_APP to bevy_window (#15585) 2024-10-02 03:01:06 +00:00
bevy_dev_tools Retained Gizmos (#15473) 2024-12-04 21:21:06 +00:00
bevy_diagnostic Revert "Update sysinfo version to 0.32.1 (#16517)" (#16523) 2024-11-26 22:44:23 +00:00
bevy_dylib Generate links to definition in source code pages on docs.rs and dev-docs.bevyengine.org (#12965) 2024-07-29 23:10:16 +00:00
bevy_ecs Deny derive_more error feature and replace it with thiserror (#16684) 2024-12-06 17:03:55 +00:00
bevy_encase_derive Update `glam to 0.29, encase` to 0.10. (#15249) 2024-09-23 19:44:02 +00:00
bevy_gilrs Deny derive_more error feature and replace it with thiserror (#16684) 2024-12-06 17:03:55 +00:00
bevy_gizmos Use multidraw for opaque meshes when GPU culling is in use. (#16427) 2024-12-06 17:22:03 +00:00
bevy_gltf Deny derive_more error feature and replace it with thiserror (#16684) 2024-12-06 17:03:55 +00:00
bevy_hierarchy Move clone_entity commands to EntityCommands (#16672) 2024-12-06 15:54:35 +00:00
bevy_image Deny derive_more error feature and replace it with thiserror (#16684) 2024-12-06 17:03:55 +00:00
bevy_input Deny derive_more error feature and replace it with thiserror (#16684) 2024-12-06 17:03:55 +00:00
bevy_input_focus bevy_input_focus improvements (follow-up PR) (#16665) 2024-12-06 01:16:52 +00:00
bevy_internal bevy_input_focus improvements (follow-up PR) (#16665) 2024-12-06 01:16:52 +00:00
bevy_log Use en-us locale for typos (#16037) 2024-10-20 18:55:17 +00:00
bevy_macro_utils Modify derive_label to support no_std environments (#15465) 2024-09-27 20:23:26 +00:00
bevy_math Deny derive_more error feature and replace it with thiserror (#16684) 2024-12-06 17:03:55 +00:00
bevy_mesh Deny derive_more error feature and replace it with thiserror (#16684) 2024-12-06 17:03:55 +00:00
bevy_mikktspace Use en-us locale for typos (#16037) 2024-10-20 18:55:17 +00:00
bevy_pbr Use multidraw for opaque meshes when GPU culling is in use. (#16427) 2024-12-06 17:22:03 +00:00
bevy_picking Fix mehses -> meshes typo (#16688) 2024-12-06 17:09:10 +00:00
bevy_ptr Fix MSRVs for standalone crates (#16333) 2024-11-17 09:38:13 +00:00
bevy_reflect Deny derive_more error feature and replace it with thiserror (#16684) 2024-12-06 17:03:55 +00:00
bevy_remote BrpQueryRow has field deserialization fix (#16613) 2024-12-04 18:26:33 +00:00
bevy_render Use multidraw for opaque meshes when GPU culling is in use. (#16427) 2024-12-06 17:22:03 +00:00
bevy_scene Deny derive_more error feature and replace it with thiserror (#16684) 2024-12-06 17:03:55 +00:00
bevy_sprite Use multidraw for opaque meshes when GPU culling is in use. (#16427) 2024-12-06 17:22:03 +00:00
bevy_state Make StateTransitionSteps public (#16612) 2024-12-03 19:48:00 +00:00
bevy_tasks Add no_std support to bevy_tasks (#15464) 2024-12-06 02:14:54 +00:00
bevy_text Deny derive_more error feature and replace it with thiserror (#16684) 2024-12-06 17:03:55 +00:00
bevy_time Use en-us locale for typos (#16037) 2024-10-20 18:55:17 +00:00
bevy_transform Deny derive_more error feature and replace it with thiserror (#16684) 2024-12-06 17:03:55 +00:00
bevy_ui Use multidraw for opaque meshes when GPU culling is in use. (#16427) 2024-12-06 17:22:03 +00:00
bevy_utils Move all_tuples to a new crate (#16161) 2024-12-03 17:41:09 +00:00
bevy_window add missing type registration for Monitor (#16685) 2024-12-06 15:20:10 +00:00
bevy_winit bevy_winit(emit raw winit events) (#15884) 2024-12-03 17:20:43 +00:00