From 911abb6f6022a964fcf1bc3b72647865e65ed305 Mon Sep 17 00:00:00 2001 From: Edward Vear Date: Fri, 24 Jun 2022 21:28:37 -0700 Subject: [PATCH] Fix skinned mesh normal handling in mesh shader --- crates/bevy_pbr/src/render/mesh.wgsl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/bevy_pbr/src/render/mesh.wgsl b/crates/bevy_pbr/src/render/mesh.wgsl index 82ad909e5ce21..7fdb17573b012 100644 --- a/crates/bevy_pbr/src/render/mesh.wgsl +++ b/crates/bevy_pbr/src/render/mesh.wgsl @@ -41,9 +41,9 @@ fn vertex(vertex: Vertex) -> VertexOutput { out.world_normal = skin_normals(model, vertex.normal); #else var model = mesh.model; + out.world_normal = mesh_normal_local_to_world(vertex.normal); #endif out.world_position = mesh_position_local_to_world(model, vec4(vertex.position, 1.0)); - out.world_normal = mesh_normal_local_to_world(vertex.normal); out.uv = vertex.uv; #ifdef VERTEX_TANGENTS out.world_tangent = mesh_tangent_local_to_world(model, vertex.tangent);