From 9086e60c20ef8f400f09802e801487ce06bb44ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois?= Date: Wed, 4 Oct 2023 20:29:29 +0200 Subject: [PATCH] wireframes: workaround for DX12 (#10022) # Objective - Fixes #10019 ## Solution - Uses a workaround for DX12 --- crates/bevy_pbr/src/render/wireframe.wgsl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/crates/bevy_pbr/src/render/wireframe.wgsl b/crates/bevy_pbr/src/render/wireframe.wgsl index 453ee5f8c1..630e86c2f2 100644 --- a/crates/bevy_pbr/src/render/wireframe.wgsl +++ b/crates/bevy_pbr/src/render/wireframe.wgsl @@ -50,7 +50,9 @@ fn vertex(vertex_no_morph: Vertex) -> VertexOutput { #ifdef SKINNED let model = bevy_pbr::skinning::skin_model(vertex.joint_indexes, vertex.joint_weights); #else - let model = get_model_matrix(vertex.instance_index); + // Use vertex_no_morph.instance_index instead of vertex.instance_index to work around a wgpu dx12 bug. + // See https://github.com/gfx-rs/naga/issues/2416 . + let model = get_model_matrix(vertex_no_morph.instance_index); #endif var out: VertexOutput;