bevy/crates/bevy_core_pipeline/src
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
..
auto_exposure Deny derive_more error feature and replace it with thiserror (#16684) 2024-12-06 17:03:55 +00:00
blit Expose Pipeline Compilation Zero Initialize Workgroup Memory Option (#16301) 2024-11-08 21:42:37 +00:00
bloom Expose Pipeline Compilation Zero Initialize Workgroup Memory Option (#16301) 2024-11-08 21:42:37 +00:00
contrast_adaptive_sharpening Fix CAS toggle broken by retained render world (#16533) 2024-11-27 23:38:09 +00:00
core_2d Use multidraw for opaque meshes when GPU culling is in use. (#16427) 2024-12-06 17:22:03 +00:00
core_3d Use multidraw for opaque meshes when GPU culling is in use. (#16427) 2024-12-06 17:22:03 +00:00
deferred Use multidraw for opaque meshes when GPU culling is in use. (#16427) 2024-12-06 17:22:03 +00:00
dof Don't reëxport bevy_image from bevy_render (#16163) 2024-11-10 06:54:38 +00:00
fullscreen_vertex_shader Bevy Asset V2 (#8624) 2023-09-07 02:07:27 +00:00
fxaa Don't reëxport bevy_image from bevy_render (#16163) 2024-11-10 06:54:38 +00:00
motion_blur Move required components doc to type doc (#16575) 2024-12-03 19:45:20 +00:00
oit Add Immutable Component Support (#16372) 2024-12-05 14:27:48 +00:00
post_process Don't reëxport bevy_image from bevy_render (#16163) 2024-11-10 06:54:38 +00:00
prepass Use multidraw for opaque meshes when GPU culling is in use. (#16427) 2024-12-06 17:22:03 +00:00
skybox Don't reëxport bevy_image from bevy_render (#16163) 2024-11-10 06:54:38 +00:00
smaa Fix missing import (#16337) 2024-11-11 18:48:41 +00:00
taa Move required components doc to type doc (#16575) 2024-12-03 19:45:20 +00:00
tonemapping Don't reëxport bevy_image from bevy_render (#16163) 2024-11-10 06:54:38 +00:00
upscaling Fix blending for CameraOutputMode::Skip (#16157) 2024-11-04 15:26:42 +00:00
lib.rs Fix oit webgl (#15728) 2024-10-08 14:50:35 +00:00
msaa_writeback.rs Simpler lint fixes: makes ci lints work but disables a lint for now (#15376) 2024-09-24 11:42:59 +00:00