Skip to content

Commit e98fe0a

Browse files
authored
Fix mesh tag feature for 2d. (#18636)
# Objective Fixes #18564
1 parent a895e87 commit e98fe0a

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

crates/bevy_sprite/src/mesh2d/mesh2d_functions.wgsl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,3 +43,7 @@ fn mesh2d_tangent_local_to_world(world_from_local: mat4x4<f32>, vertex_tangent:
4343
vertex_tangent.w
4444
);
4545
}
46+
47+
fn get_tag(instance_index: u32) -> u32 {
48+
return mesh[instance_index].tag;
49+
}

crates/bevy_sprite/src/mesh2d/mesh2d_types.wgsl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,5 @@ struct Mesh2d {
1313
local_from_world_transpose_b: f32,
1414
// 'flags' is a bit field indicating various options. u32 is 32 bits so we have up to 32 options.
1515
flags: u32,
16+
tag: u32,
1617
};

0 commit comments

Comments
 (0)