remove ViewUniformOffset from inactive cameras (#16399)

# Objective

- Fixes #16285 
- Inactive camera are keeping the component `ViewUniformOffset` from
when they were active, still matching some queries trying to render to
them

## Solution

- Remove component `ViewUniformOffset` from cameras that are inactive

## Testing

- Ran example `render_primitives` and switched camera
This commit is contained in:
François Mockers 2024-11-16 21:39:13 +01:00 committed by GitHub
parent 56ac38120b
commit bce19c1012
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1,6 +1,4 @@
use super::{ClearColorConfig, Projection};
use crate::sync_world::TemporaryRenderEntity;
use crate::view::RenderVisibleEntities;
use crate::{
batching::gpu_preprocessing::GpuPreprocessingSupport,
camera::{CameraProjection, ManualTextureViewHandle, ManualTextureViews},
@ -8,11 +6,12 @@ use crate::{
render_asset::RenderAssets,
render_graph::{InternedRenderSubGraph, RenderSubGraph},
render_resource::TextureView,
sync_world::TemporaryRenderEntity,
sync_world::{RenderEntity, SyncToRenderWorld},
texture::GpuImage,
view::{
ColorGrading, ExtractedView, ExtractedWindows, GpuCulling, Msaa, RenderLayers, Visibility,
VisibleEntities,
ColorGrading, ExtractedView, ExtractedWindows, GpuCulling, Msaa, RenderLayers,
RenderVisibleEntities, ViewUniformOffset, Visibility, VisibleEntities,
},
Extract,
};
@ -1065,6 +1064,7 @@ pub fn extract_cameras(
RenderLayers,
Projection,
GpuCulling,
ViewUniformOffset,
)>();
continue;
}