Skip to content

Commit

Permalink
Fix shader (#219)
Browse files Browse the repository at this point in the history
  • Loading branch information
Nilirad authored Jul 8, 2023
1 parent e461bdd commit 3d4641c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/plugin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ fn mesh_shapes_system(
Or<(Changed<Path>, Changed<Fill>, Changed<Stroke>)>,
>,
) {
for (maybe_fill_mode, maybe_stroke_mode, path, mut mesh) in query.iter_mut() {
for (maybe_fill_mode, maybe_stroke_mode, path, mut mesh) in &mut query {
let mut buffers = VertexBuffers::new();

if let Some(fill_mode) = maybe_fill_mode {
Expand Down
9 changes: 3 additions & 6 deletions src/render/shape_material.wgsl
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#import bevy_sprite::mesh2d_types
#import bevy_sprite::mesh2d_types Mesh2d
#import bevy_sprite::mesh2d_view_bindings
#import bevy_sprite::mesh2d_vertex_output MeshVertexOutput

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

struct FragmentInput {
#import bevy_sprite::mesh2d_vertex_output
};

@fragment
fn fragment(in: FragmentInput) -> @location(0) vec4<f32> {
fn fragment(in: MeshVertexOutput) -> @location(0) vec4<f32> {
return in.color;
}

0 comments on commit 3d4641c

Please sign in to comment.