From d6fe10675604434120ad41b38e3403928d1dc675 Mon Sep 17 00:00:00 2001 From: CatThingy Date: Sun, 9 Oct 2022 16:21:42 +0000 Subject: [PATCH] Call `mesh2d_tangent_local_to_world` with the right arguments (#6209) # Objective Allow `Mesh2d` shaders to work with meshes that have vertex tangents ## Solution Correctly pass `mesh.model` into `mesh2d_tangent_local_to_world` --- crates/bevy_sprite/src/mesh2d/mesh2d.wgsl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/bevy_sprite/src/mesh2d/mesh2d.wgsl b/crates/bevy_sprite/src/mesh2d/mesh2d.wgsl index 00c3a9ab74416..5e5671eba7eff 100644 --- a/crates/bevy_sprite/src/mesh2d/mesh2d.wgsl +++ b/crates/bevy_sprite/src/mesh2d/mesh2d.wgsl @@ -29,7 +29,7 @@ fn vertex(vertex: Vertex) -> VertexOutput { out.clip_position = mesh2d_position_world_to_clip(out.world_position); out.world_normal = mesh2d_normal_local_to_world(vertex.normal); #ifdef VERTEX_TANGENTS - out.world_tangent = mesh2d_tangent_local_to_world(vertex.tangent); + out.world_tangent = mesh2d_tangent_local_to_world(mesh.model, vertex.tangent); #endif #ifdef VERTEX_COLORS out.color = vertex.color;