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.
This commit is contained in:
Robert Swain 2023-09-02 20:11:13 +02:00 committed by GitHub
parent 4fdea02087
commit ce1ac05c63
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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
}