bevy/crates/bevy_pbr/src/render
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
..
clustered_forward.wgsl move wgsl color operations from bevy_pbr to bevy_render (#13209) 2024-05-04 10:30:23 +00:00
fog.rs Add color conversions #13224 (#13276) 2024-05-09 18:01:52 +00:00
fog.wgsl update shader imports (#10180) 2023-10-21 11:51:58 +00:00
forward_io.wgsl Add UV channel selection to StandardMaterial (#13200) 2024-05-13 18:23:09 +00:00
gpu_preprocess.rs Implement GPU frustum culling. (#12889) 2024-04-28 12:50:00 +00:00
light.rs Make render phases render world resources instead of components. (#13277) 2024-05-21 18:23:04 +00:00
mesh_bindings.rs Implement lightmaps. (#10231) 2024-01-02 20:38:47 +00:00
mesh_bindings.wgsl Swap material and mesh bind groups (#10485) 2023-11-28 22:26:22 +00:00
mesh_functions.wgsl Fix the WebGL 2 backend by giving the visibility_ranges array a fixed length. (#13210) 2024-05-08 07:34:59 +00:00
mesh_preprocess.wgsl Implement GPU frustum culling. (#12889) 2024-04-28 12:50:00 +00:00
mesh_types.wgsl Implement visibility ranges, also known as hierarchical levels of detail (HLODs). (#12916) 2024-05-03 00:11:35 +00:00
mesh_view_bindings.rs Remove another .view_layouts (#13410) 2024-05-19 00:08:27 +00:00
mesh_view_bindings.wgsl Fix the WebGL 2 backend by giving the visibility_ranges array a fixed length. (#13210) 2024-05-08 07:34:59 +00:00
mesh_view_types.wgsl Implement volumetric fog and volumetric lighting, also known as light shafts or god rays. (#13057) 2024-05-16 17:13:18 +00:00
mesh.rs Remove unnecessary .view_layouts (#13394) 2024-05-16 19:12:36 +00:00
mesh.wgsl Add UV channel selection to StandardMaterial (#13200) 2024-05-13 18:23:09 +00:00
mod.rs Generate MeshUniforms on the GPU via compute shader where available. (#12773) 2024-04-10 05:33:32 +00:00
morph.rs Add BufferVec, an higher-performance alternative to StorageBuffer, and make GpuArrayBuffer use it. (#13199) 2024-05-03 11:39:21 +00:00
morph.wgsl Swap material and mesh bind groups (#10485) 2023-11-28 22:26:22 +00:00
parallax_mapping.wgsl update shader imports (#10180) 2023-10-21 11:51:58 +00:00
pbr_ambient.wgsl Use “specular occlusion” term to consistently extinguish fresnel on Ambient and Environment Map lights (#10182) 2023-10-23 03:26:20 +00:00
pbr_bindings.wgsl Implement clearcoat per the Filament and the KHR_materials_clearcoat specifications. (#13031) 2024-05-05 22:57:05 +00:00
pbr_fragment.wgsl Add emissive_exposure_weight to the StandardMaterial (#13350) 2024-05-17 13:49:53 +00:00
pbr_functions.wgsl Add emissive_exposure_weight to the StandardMaterial (#13350) 2024-05-17 13:49:53 +00:00
pbr_lighting.wgsl Implement clearcoat per the Filament and the KHR_materials_clearcoat specifications. (#13031) 2024-05-05 22:57:05 +00:00
pbr_prepass_functions.wgsl Make the prepass shader compile when lightmaps are present. (#13402) 2024-05-18 22:28:31 +00:00
pbr_prepass.wgsl Apply uv transform in the prepass (#13250) 2024-05-13 22:33:09 +00:00
pbr_transmission.wgsl move wgsl color operations from bevy_pbr to bevy_render (#13209) 2024-05-04 10:30:23 +00:00
pbr_types.wgsl Implement clearcoat per the Filament and the KHR_materials_clearcoat specifications. (#13031) 2024-05-05 22:57:05 +00:00
pbr.wgsl Implement visibility ranges, also known as hierarchical levels of detail (HLODs). (#12916) 2024-05-03 00:11:35 +00:00
rgb9e5.wgsl Deferred Renderer (#9258) 2023-10-12 22:10:38 +00:00
shadow_sampling.wgsl move wgsl color operations from bevy_pbr to bevy_render (#13209) 2024-05-04 10:30:23 +00:00
shadows.wgsl Implement volumetric fog and volumetric lighting, also known as light shafts or god rays. (#13057) 2024-05-16 17:13:18 +00:00
skin.rs Add BufferVec, an higher-performance alternative to StorageBuffer, and make GpuArrayBuffer use it. (#13199) 2024-05-03 11:39:21 +00:00
skinning.wgsl Swap material and mesh bind groups (#10485) 2023-11-28 22:26:22 +00:00
utils.wgsl move wgsl color operations from bevy_pbr to bevy_render (#13209) 2024-05-04 10:30:23 +00:00
view_transformations.wgsl View Transformations (#9726) 2023-10-24 21:26:19 +00:00
wireframe.wgsl Swap material and mesh bind groups (#10485) 2023-11-28 22:26:22 +00:00