Skip to content

Commit 2f5a1c6

Browse files
remove redundant query parameters (#4945)
# Objective In the `queue_custom` system in `shader_instancing` example, the query of `material_meshes` has a redundant `With<Handle<Mesh>>` query filter because `Handle<Mesh>` is included in the component access. ## Solution Remove the `With<Handle<Mesh>>` filter
1 parent 765bd46 commit 2f5a1c6

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

examples/shader/shader_instancing.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -106,10 +106,7 @@ fn queue_custom(
106106
mut pipelines: ResMut<SpecializedMeshPipelines<CustomPipeline>>,
107107
mut pipeline_cache: ResMut<PipelineCache>,
108108
meshes: Res<RenderAssets<Mesh>>,
109-
material_meshes: Query<
110-
(Entity, &MeshUniform, &Handle<Mesh>),
111-
(With<Handle<Mesh>>, With<InstanceMaterialData>),
112-
>,
109+
material_meshes: Query<(Entity, &MeshUniform, &Handle<Mesh>), With<InstanceMaterialData>>,
113110
mut views: Query<(&ExtractedView, &mut RenderPhase<Transparent3d>)>,
114111
) {
115112
let draw_custom = transparent_3d_draw_functions

0 commit comments

Comments
 (0)