Skip to content

Commit

Permalink
fix shader_instancing (bevyengine#7305)
Browse files Browse the repository at this point in the history
# Objective

- The changes to the MeshPipeline done for the prepass broke the shader_instancing example. The issue is that the view_layout changes based on if MSAA is enabled or not, but the example hardcoded the view_layout.

## Solution

- Don't overwrite the bind_group_layout of the descriptor since the MeshPipeline already takes care of this in the specialize function.

Closes bevyengine#7285
  • Loading branch information
IceSentry authored and ItsDoot committed Feb 1, 2023
1 parent 031685b commit b77b825
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions examples/shader/shader_instancing.rs
Original file line number Diff line number Diff line change
Expand Up @@ -205,11 +205,6 @@ impl SpecializedMeshPipeline for CustomPipeline {
],
});
descriptor.fragment.as_mut().unwrap().shader = self.shader.clone();
descriptor.layout = Some(vec![
self.mesh_pipeline.view_layout.clone(),
self.mesh_pipeline.mesh_layout.clone(),
]);

Ok(descriptor)
}
}
Expand Down

0 comments on commit b77b825

Please sign in to comment.