Skip to content

Commit 3d4641c

Browse files
authored
Fix shader (#219)
1 parent e461bdd commit 3d4641c

File tree

2 files changed

+4
-7
lines changed

2 files changed

+4
-7
lines changed

src/plugin.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ fn mesh_shapes_system(
7373
Or<(Changed<Path>, Changed<Fill>, Changed<Stroke>)>,
7474
>,
7575
) {
76-
for (maybe_fill_mode, maybe_stroke_mode, path, mut mesh) in query.iter_mut() {
76+
for (maybe_fill_mode, maybe_stroke_mode, path, mut mesh) in &mut query {
7777
let mut buffers = VertexBuffers::new();
7878

7979
if let Some(fill_mode) = maybe_fill_mode {

src/render/shape_material.wgsl

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
#import bevy_sprite::mesh2d_types
1+
#import bevy_sprite::mesh2d_types Mesh2d
22
#import bevy_sprite::mesh2d_view_bindings
3+
#import bevy_sprite::mesh2d_vertex_output MeshVertexOutput
34

45
@group(1) @binding(1)
56
var texture: texture_2d<f32>;
@@ -8,11 +9,7 @@ var texture_sampler: sampler;
89
@group(2) @binding(0)
910
var<uniform> mesh: Mesh2d;
1011

11-
struct FragmentInput {
12-
#import bevy_sprite::mesh2d_vertex_output
13-
};
14-
1512
@fragment
16-
fn fragment(in: FragmentInput) -> @location(0) vec4<f32> {
13+
fn fragment(in: MeshVertexOutput) -> @location(0) vec4<f32> {
1714
return in.color;
1815
}

0 commit comments

Comments
 (0)