Skip to content

Commit ce1ac05

Browse files
authored
Explicitly make instance_index vertex output @interpolate(flat) (#9675)
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.
1 parent 4fdea02 commit ce1ac05

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

crates/bevy_pbr/src/render/mesh_vertex_output.wgsl

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,6 @@ struct MeshVertexOutput {
1616
@location(4) color: vec4<f32>,
1717
#endif
1818
#ifdef VERTEX_OUTPUT_INSTANCE_INDEX
19-
@location(5) instance_index: u32,
19+
@location(5) @interpolate(flat) instance_index: u32,
2020
#endif
2121
}

0 commit comments

Comments
 (0)