Skip to content

Commit

Permalink
Explicitly make instance_index vertex output @interpolate(flat) (#9675)
Browse files Browse the repository at this point in the history
The WGSL spec says that all scalar or vector integer vertex stage
outputs and fragment stage inputs must be marked as @interpolate(flat).
I think wgpu fixed this up for us, but being explicit is more correct.
  • Loading branch information
superdump committed Sep 2, 2023
1 parent 4fdea02 commit ce1ac05
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion crates/bevy_pbr/src/render/mesh_vertex_output.wgsl
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@ struct MeshVertexOutput {
@location(4) color: vec4<f32>,
#endif
#ifdef VERTEX_OUTPUT_INSTANCE_INDEX
@location(5) instance_index: u32,
@location(5) @interpolate(flat) instance_index: u32,
#endif
}

0 comments on commit ce1ac05

Please sign in to comment.