Skip to content

Commit

Permalink
fix(tilemap): 🐛 fix collision shader on native
Browse files Browse the repository at this point in the history
I don't know how I missed this, but the collision shader still expected there to be a bind group when we weren't passing one!
  • Loading branch information
melody-rs committed Dec 3, 2023
1 parent 5988e7c commit a562e49
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion crates/graphics/src/collision/shader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -72,12 +72,20 @@ pub fn create_render_pipeline(
"Tilemap Collision Render Pipeline Layout (uniforms)"
};

let collision_bgl: &wgpu::BindGroupLayout = &bind_group_layouts.collision;
let bind_group_layout_slice = std::slice::from_ref(&collision_bgl);
let bind_group_layouts: &[&wgpu::BindGroupLayout] = if push_constants_supported {
&[]
} else {
bind_group_layout_slice
};

let pipeline_layout =
render_state
.device
.create_pipeline_layout(&wgpu::PipelineLayoutDescriptor {
label: Some(label),
bind_group_layouts: &[&bind_group_layouts.collision],
bind_group_layouts,
push_constant_ranges,
});

Expand Down

0 comments on commit a562e49

Please sign in to comment.