Skip to content

Commit

Permalink
Call mesh2d_tangent_local_to_world with the right arguments (bevyen…
Browse files Browse the repository at this point in the history
…gine#6209)

# Objective

Allow `Mesh2d` shaders to work with meshes that have vertex tangents
## Solution

Correctly pass `mesh.model` into `mesh2d_tangent_local_to_world`
  • Loading branch information
CatThingy authored and james7132 committed Oct 19, 2022
1 parent 8b8df09 commit 8fc5f79
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion crates/bevy_sprite/src/mesh2d/mesh2d.wgsl
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 8fc5f79

Please sign in to comment.