Skip to content

Commit 9086e60

Browse files
authored
wireframes: workaround for DX12 (#10022)
# Objective - Fixes #10019 ## Solution - Uses a workaround for DX12
1 parent f9e50e7 commit 9086e60

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

crates/bevy_pbr/src/render/wireframe.wgsl

+3-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,9 @@ fn vertex(vertex_no_morph: Vertex) -> VertexOutput {
5050
#ifdef SKINNED
5151
let model = bevy_pbr::skinning::skin_model(vertex.joint_indexes, vertex.joint_weights);
5252
#else
53-
let model = get_model_matrix(vertex.instance_index);
53+
// Use vertex_no_morph.instance_index instead of vertex.instance_index to work around a wgpu dx12 bug.
54+
// See https://github.com/gfx-rs/naga/issues/2416 .
55+
let model = get_model_matrix(vertex_no_morph.instance_index);
5456
#endif
5557

5658
var out: VertexOutput;

0 commit comments

Comments
 (0)