From ce1ac05c632a42ea98630b8525c56baf6a771508 Mon Sep 17 00:00:00 2001 From: Robert Swain Date: Sat, 2 Sep 2023 20:11:13 +0200 Subject: [PATCH] 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. --- crates/bevy_pbr/src/render/mesh_vertex_output.wgsl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/bevy_pbr/src/render/mesh_vertex_output.wgsl b/crates/bevy_pbr/src/render/mesh_vertex_output.wgsl index 32418f8043..6cf70d2d17 100644 --- a/crates/bevy_pbr/src/render/mesh_vertex_output.wgsl +++ b/crates/bevy_pbr/src/render/mesh_vertex_output.wgsl @@ -16,6 +16,6 @@ struct MeshVertexOutput { @location(4) color: vec4, #endif #ifdef VERTEX_OUTPUT_INSTANCE_INDEX - @location(5) instance_index: u32, + @location(5) @interpolate(flat) instance_index: u32, #endif }