From 4afd518f45754c1173c74e339a16cb82bb8101ec Mon Sep 17 00:00:00 2001 From: SeanOMik Date: Wed, 27 Nov 2024 23:12:12 -0500 Subject: [PATCH] render: remove unused field from SpriteInstance struct on gpu --- crates/lyra-game/src/render/graph/passes/sprite.rs | 4 ---- crates/lyra-game/src/render/shaders/2d/sprite_main.wgsl | 1 - 2 files changed, 5 deletions(-) diff --git a/crates/lyra-game/src/render/graph/passes/sprite.rs b/crates/lyra-game/src/render/graph/passes/sprite.rs index 184d8ff..743cae4 100644 --- a/crates/lyra-game/src/render/graph/passes/sprite.rs +++ b/crates/lyra-game/src/render/graph/passes/sprite.rs @@ -387,8 +387,6 @@ impl Node for SpritePass { let inst = SpriteInstance { atlas_frame: rect.unwrap_or(URect::ZERO), transform: transform.calculate_mat4(), - pivot, - _padding: [0; 2], }; sprite_instances.push(inst); let inst_id = sprite_instances.len() as u64 - 1; @@ -477,6 +475,4 @@ impl Node for SpritePass { struct SpriteInstance { atlas_frame: URect, transform: glam::Mat4, - pivot: glam::Vec2, - _padding: [u32; 2], } \ No newline at end of file diff --git a/crates/lyra-game/src/render/shaders/2d/sprite_main.wgsl b/crates/lyra-game/src/render/shaders/2d/sprite_main.wgsl index d74d836..8654a14 100644 --- a/crates/lyra-game/src/render/shaders/2d/sprite_main.wgsl +++ b/crates/lyra-game/src/render/shaders/2d/sprite_main.wgsl @@ -26,7 +26,6 @@ struct URect { struct SpriteInstance { atlas_frame: URect, transform: mat4x4, - pivot: vec2, } struct CameraUniform {