Skip to content

Commit

Permalink
wireframes: workaround for DX12 (bevyengine#10022)
Browse files Browse the repository at this point in the history
# Objective

- Fixes bevyengine#10019

## Solution

- Uses a workaround for DX12
  • Loading branch information
mockersf authored and ameknite committed Nov 6, 2023
1 parent 12cfaf8 commit aec7a59
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion crates/bevy_pbr/src/render/wireframe.wgsl
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit aec7a59

Please sign in to comment.