Skip to content

Commit

Permalink
remove redundant query parameters (bevyengine#4945)
Browse files Browse the repository at this point in the history
# 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
  • Loading branch information
YoshieraHuang3456 authored and james7132 committed Oct 28, 2022
1 parent c3b0be0 commit ddb32e6
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions examples/shader/shader_instancing.rs
Original file line number Diff line number Diff line change
Expand Up @@ -106,10 +106,7 @@ fn queue_custom(
mut pipelines: ResMut<SpecializedMeshPipelines<CustomPipeline>>,
mut pipeline_cache: ResMut<PipelineCache>,
meshes: Res<RenderAssets<Mesh>>,
material_meshes: Query<
(Entity, &MeshUniform, &Handle<Mesh>),
(With<Handle<Mesh>>, With<InstanceMaterialData>),
>,
material_meshes: Query<(Entity, &MeshUniform, &Handle<Mesh>), With<InstanceMaterialData>>,
mut views: Query<(&ExtractedView, &mut RenderPhase<Transparent3d>)>,
) {
let draw_custom = transparent_3d_draw_functions
Expand Down

0 comments on commit ddb32e6

Please sign in to comment.