mirror of
https://github.com/bevyengine/bevy
synced 2024-11-21 20:23:28 +00:00
Don’t prepare 2D view bind groups for 3D cameras (#14481)
# 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<Camera2d>` to the views query. ## Testing - Verified the examples still work.
This commit is contained in:
parent
5aa998dc07
commit
438217035d
1 changed files with 2 additions and 2 deletions
|
@ -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<RenderDevice>,
|
||||
mesh2d_pipeline: Res<Mesh2dPipeline>,
|
||||
view_uniforms: Res<ViewUniforms>,
|
||||
views: Query<(Entity, &Tonemapping), With<ExtractedView>>,
|
||||
views: Query<(Entity, &Tonemapping), (With<ExtractedView>, With<Camera2d>)>,
|
||||
globals_buffer: Res<GlobalsBuffer>,
|
||||
tonemapping_luts: Res<TonemappingLuts>,
|
||||
images: Res<RenderAssets<GpuImage>>,
|
||||
|
|
Loading…
Reference in a new issue