bevy/crates/bevy_core_pipeline/src
Patrick Walton 9da0b2a0ec
Make render phases render world resources instead of components. (#13277)
This commit makes us stop using the render world ECS for
`BinnedRenderPhase` and `SortedRenderPhase` and instead use resources
with `EntityHashMap`s inside. There are three reasons to do this:

1. We can use `clear()` to clear out the render phase collections
instead of recreating the components from scratch, allowing us to reuse
allocations.

2. This is a prerequisite for retained bins, because components can't be
retained from frame to frame in the render world, but resources can.

3. We want to move away from storing anything in components in the
render world ECS, and this is a step in that direction.

This patch results in a small performance benefit, due to point (1)
above.

## Changelog

### Changed

* The `BinnedRenderPhase` and `SortedRenderPhase` render world
components have been replaced with `ViewBinnedRenderPhases` and
`ViewSortedRenderPhases` resources.

## Migration Guide

* The `BinnedRenderPhase` and `SortedRenderPhase` render world
components have been replaced with `ViewBinnedRenderPhases` and
`ViewSortedRenderPhases` resources. Instead of querying for the
components, look the camera entity up in the
`ViewBinnedRenderPhases`/`ViewSortedRenderPhases` tables.
2024-05-21 18:23:04 +00:00
..
auto_exposure Fix incorrect workgroupBarrier and OOB array access in auto_exposure (#13283) 2024-05-12 23:24:58 +00:00
blit Refactor App and SubApp internals for better separation (#9202) 2024-03-31 03:16:10 +00:00
bloom Clean up 2d render phases (#12982) 2024-05-08 08:13:39 +00:00
contrast_adaptive_sharpening Refactor App and SubApp internals for better separation (#9202) 2024-03-31 03:16:10 +00:00
core_2d Make render phases render world resources instead of components. (#13277) 2024-05-21 18:23:04 +00:00
core_3d Make render phases render world resources instead of components. (#13277) 2024-05-21 18:23:04 +00:00
deferred Make render phases render world resources instead of components. (#13277) 2024-05-21 18:23:04 +00:00
dof Fix lints on beta Rust (#13444) 2024-05-20 20:40:59 +00:00
fullscreen_vertex_shader Bevy Asset V2 (#8624) 2023-09-07 02:07:27 +00:00
fxaa Refactor App and SubApp internals for better separation (#9202) 2024-03-31 03:16:10 +00:00
motion_blur Fix motion blur on wasm (#13099) 2024-05-12 21:03:36 +00:00
prepass Make render phases render world resources instead of components. (#13277) 2024-05-21 18:23:04 +00:00
skybox Consolidate Render(Ui)Materials(2d) into RenderAssets (#12827) 2024-04-09 13:26:34 +00:00
taa Per-Object Motion Blur (#9924) 2024-04-25 01:16:02 +00:00
tonemapping move wgsl color operations from bevy_pbr to bevy_render (#13209) 2024-05-04 10:30:23 +00:00
upscaling Refactor App and SubApp internals for better separation (#9202) 2024-03-31 03:16:10 +00:00
lib.rs Implement fast depth of field as a postprocessing effect. (#13009) 2024-05-13 18:23:56 +00:00
msaa_writeback.rs Clean up 2d render phases (#12982) 2024-05-08 08:13:39 +00:00