bevy/crates/bevy_render
Sélène Amanita 77824b96ff
Update Camera's Frustum only when its GlobalTransform or CameraProjection changed (#9092)
# Objective

Update a camera's frustum only when needed.

- Maybe a performance gain from not having to compute frusta when not
needed, at the cost of change detection (?)
- Making "fighting" with `update_frusta` less tedious, see
https://github.com/bevyengine/bevy/issues/9077 and
https://discord.com/channels/691052431525675048/743663924229963868/1127566087966433322

## Solution

Add change detection filter for `GlobalTransform` or `T:
CameraProjection` in `update_frusta`, since those are the cases when the
frustum needs to be updated.

## Note

I don't think a migration guide and changelog are needed, but I'm not
100% sure, I could put something like "if you're fighting against
`update_frusta`, you can do it only when there is a change to
`GlobalTransform` or `CameraProjection` now", what do you think? It's
not really a breaking change with a normal use case.
2023-08-10 00:06:27 +00:00
..
macros Bump Version after Release (#9106) 2023-07-10 21:19:27 +00:00
src Update Camera's Frustum only when its GlobalTransform or CameraProjection changed (#9092) 2023-08-10 00:06:27 +00:00
Cargo.toml bevy_render: Remove direct dep on wgpu-hal. (#9249) 2023-07-23 12:43:28 +00:00