Skip to content

Commit 5e71d7f

Browse files
committed
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`
1 parent ca3e6e6 commit 5e71d7f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

crates/bevy_sprite/src/mesh2d/mesh2d.wgsl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ fn vertex(vertex: Vertex) -> VertexOutput {
2929
out.clip_position = mesh2d_position_world_to_clip(out.world_position);
3030
out.world_normal = mesh2d_normal_local_to_world(vertex.normal);
3131
#ifdef VERTEX_TANGENTS
32-
out.world_tangent = mesh2d_tangent_local_to_world(vertex.tangent);
32+
out.world_tangent = mesh2d_tangent_local_to_world(mesh.model, vertex.tangent);
3333
#endif
3434
#ifdef VERTEX_COLORS
3535
out.color = vertex.color;

0 commit comments

Comments
 (0)