bevy/crates/bevy_render/src
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
..
camera Document when Camera::viewport_to_world and related methods return None (#8841) 2023-08-03 00:12:44 +00:00
color bevy_reflect: FromReflect Ergonomics Implementation (#6056) 2023-06-29 01:31:34 +00:00
mesh fix typo in a link - Mesh docs (#9329) 2023-08-01 21:03:16 +00:00
primitives bevy_reflect: FromReflect Ergonomics Implementation (#6056) 2023-06-29 01:31:34 +00:00
render_graph Add ViewNode to simplify render node management (#8118) 2023-05-08 19:42:23 +00:00
render_phase Apply codebase changes in preparation for StandardMaterial transmission (#8704) 2023-05-30 14:21:53 +00:00
render_resource include toplevel shader-associated defs (#9343) 2023-08-03 09:12:31 +00:00
renderer Refs #8975 -- Add return to RenderDevice::poll() (#8977) 2023-06-28 01:05:03 +00:00
texture Fix panic whilst loading UASTC encoded ktx2 textures (#9158) 2023-07-23 01:27:37 +00:00
view Update Camera's Frustum only when its GlobalTransform or CameraProjection changed (#9092) 2023-08-10 00:06:27 +00:00
extract_component.rs Schedule-First: the new and improved add_systems (#8079) 2023-03-18 01:45:34 +00:00
extract_param.rs Use UnsafeWorldCell to increase code quality for SystemParam (#8174) 2023-04-01 15:45:07 +00:00
extract_resource.rs Schedule-First: the new and improved add_systems (#8079) 2023-03-18 01:45:34 +00:00
globals.rs Webgpu support (#8336) 2023-05-04 22:07:57 +00:00
globals.wgsl Refactor Globals and View structs into separate shaders (#7512) 2023-02-11 17:55:18 +00:00
gpu_component_array_buffer.rs Use GpuArrayBuffer for MeshUniform (#9254) 2023-07-30 13:17:08 +00:00
instance_index.wgsl Work around naga/wgpu WGSL instance_index -> GLSL gl_InstanceID bug on WebGL2 (#9383) 2023-08-09 18:38:45 +00:00
lib.rs Work around naga/wgpu WGSL instance_index -> GLSL gl_InstanceID bug on WebGL2 (#9383) 2023-08-09 18:38:45 +00:00
pipelined_rendering.rs Stop using unwrap in the pipelined rendering thread (#9052) 2023-07-23 01:06:25 +00:00
render_asset.rs Schedule-First: the new and improved add_systems (#8079) 2023-03-18 01:45:34 +00:00
settings.rs Webgpu support (#8336) 2023-05-04 22:07:57 +00:00
spatial_bundle.rs enum Visibility component (#6320) 2022-12-25 00:39:29 +00:00