bevy/crates/bevy_pbr/src
Kurt Kühnert b833bdab17 Allow to reuse the same RenderPass for multiple RenderPhases (#7043)
# Objective

- The recently merged PR #7013 does not allow multiple `RenderPhase`s to share the same `RenderPass`.
- Due to the introduced overhead we want to minimize the number of `RenderPass`es recorded during each frame.

## Solution

- Take a constructed `TrackedRenderPass` instead of a `RenderPassDiscriptor` as a parameter to the `RenderPhase::render` method.

---

## Changelog

To enable multiple `RenderPhases` to share the same `TrackedRenderPass`,
the `RenderPhase::render` signature has changed.

```rust
pub fn render<'w>(
  &self,
  render_pass: &mut TrackedRenderPass<'w>,
  world: &'w World,
  view: Entity)
```


Co-authored-by: Kurt Kühnert <51823519+kurtkuehnert@users.noreply.github.com>
2023-01-02 21:39:54 +00:00
..
render Allow to reuse the same RenderPass for multiple RenderPhases (#7043) 2023-01-02 21:39:54 +00:00
alpha.rs add ReflectAsset and ReflectHandle (#5923) 2022-10-28 20:42:33 +00:00
bundle.rs Visibilty Inheritance, universal ComputedVisibility and RenderLayers support (#5310) 2022-07-15 23:24:42 +00:00
lib.rs Add try_* to add_slot_edge, add_node_edge (#6720) 2022-11-21 21:58:39 +00:00
light.rs Reflect for Tonemapping and ClusterConfig (#6488) 2022-11-07 19:44:17 +00:00
material.rs Add DrawFunctionsInternals::id() (#6745) 2022-11-28 13:54:13 +00:00
pbr_material.rs Shader defs can now have a value (#5900) 2022-11-21 22:38:29 +00:00
wireframe.rs Add DrawFunctionsInternals::id() (#6745) 2022-11-28 13:54:13 +00:00