From 438217035d2733bbe555fa45732817e85f83f6b7 Mon Sep 17 00:00:00 2001 From: Brian Reavis Date: Thu, 25 Jul 2024 13:37:54 -0700 Subject: [PATCH] =?UTF-8?q?Don=E2=80=99t=20prepare=202D=20view=20bind=20gr?= =?UTF-8?q?oups=20for=203D=20cameras=20(#14481)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit # Objective - Before this fix, the view query in `prepare_mesh2d_view_bind_groups` matched all views – leading to 2D view bind groups being prepared for 3D cameras. ## Solution - Added `With` to the views query. ## Testing - Verified the examples still work. --- crates/bevy_sprite/src/mesh2d/mesh.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/bevy_sprite/src/mesh2d/mesh.rs b/crates/bevy_sprite/src/mesh2d/mesh.rs index 2db6149c5fbd0..c5d497d1d44a1 100644 --- a/crates/bevy_sprite/src/mesh2d/mesh.rs +++ b/crates/bevy_sprite/src/mesh2d/mesh.rs @@ -1,7 +1,7 @@ use bevy_app::Plugin; use bevy_asset::{load_internal_asset, AssetId, Handle}; -use bevy_core_pipeline::core_2d::Transparent2d; +use bevy_core_pipeline::core_2d::{Camera2d, Transparent2d}; use bevy_core_pipeline::tonemapping::{ get_lut_bind_group_layout_entries, get_lut_bindings, Tonemapping, TonemappingLuts, }; @@ -611,7 +611,7 @@ pub fn prepare_mesh2d_view_bind_groups( render_device: Res, mesh2d_pipeline: Res, view_uniforms: Res, - views: Query<(Entity, &Tonemapping), With>, + views: Query<(Entity, &Tonemapping), (With, With)>, globals_buffer: Res, tonemapping_luts: Res, images: Res>,