Skip to content

Commit

Permalink
Fix a typo in shader_defs example (#3762)
Browse files Browse the repository at this point in the history
# Objective

As in title, I'm already looking through these files so may as well rename `pipline` to `pipeline`
  • Loading branch information
luke-biel committed Jan 24, 2022
1 parent 514754d commit 6d76229
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions examples/shader/shader_defs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ fn setup(mut commands: Commands, mut meshes: ResMut<Assets<Mesh>>) {
}

struct IsRedPipeline {
mesh_pipline: MeshPipeline,
mesh_pipeline: MeshPipeline,
shader: Handle<Shader>,
}

Expand All @@ -92,7 +92,7 @@ impl FromWorld for IsRedPipeline {
let mesh_pipeline = world.get_resource::<MeshPipeline>().unwrap();
let shader = asset_server.load("shaders/shader_defs.wgsl");
IsRedPipeline {
mesh_pipline: mesh_pipeline.clone(),
mesh_pipeline: mesh_pipeline.clone(),
shader,
}
}
Expand All @@ -106,15 +106,15 @@ impl SpecializedPipeline for IsRedPipeline {
if is_red.0 {
shader_defs.push("IS_RED".to_string());
}
let mut descriptor = self.mesh_pipline.specialize(pbr_pipeline_key);
let mut descriptor = self.mesh_pipeline.specialize(pbr_pipeline_key);
descriptor.vertex.shader = self.shader.clone();
descriptor.vertex.shader_defs = shader_defs.clone();
let fragment = descriptor.fragment.as_mut().unwrap();
fragment.shader = self.shader.clone();
fragment.shader_defs = shader_defs;
descriptor.layout = Some(vec![
self.mesh_pipline.view_layout.clone(),
self.mesh_pipline.mesh_layout.clone(),
self.mesh_pipeline.view_layout.clone(),
self.mesh_pipeline.mesh_layout.clone(),
]);
descriptor
}
Expand Down

0 comments on commit 6d76229

Please sign in to comment.