From 4073103973d001287bb075fcd767e080932d3622 Mon Sep 17 00:00:00 2001 From: guylamar2006 Date: Sun, 1 Dec 2024 13:06:30 -0600 Subject: [PATCH] Update instance_data.rs --- .../src/render/waterfall/pipeline/instance_data.rs | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/neothesia-core/src/render/waterfall/pipeline/instance_data.rs b/neothesia-core/src/render/waterfall/pipeline/instance_data.rs index 37de744a..19e24954 100644 --- a/neothesia-core/src/render/waterfall/pipeline/instance_data.rs +++ b/neothesia-core/src/render/waterfall/pipeline/instance_data.rs @@ -1,5 +1,4 @@ use wgpu_jumpstart::wgpu; - use bytemuck::{Pod, Zeroable}; use wgpu::vertex_attr_array; @@ -10,11 +9,18 @@ pub struct NoteInstance { pub size: [f32; 2], pub color: [f32; 3], pub radius: f32, + pub note_name: [u8; 4], // Add this line } impl NoteInstance { - pub fn attributes() -> [wgpu::VertexAttribute; 4] { - vertex_attr_array!(1 => Float32x2, 2 => Float32x2, 3 => Float32x3, 4 => Float32) + pub fn attributes() -> [wgpu::VertexAttribute; 5] { // Update number of attributes + vertex_attr_array!( + 1 => Float32x2, + 2 => Float32x2, + 3 => Float32x3, + 4 => Float32, + 5 => Uint32x4 // Add this line for note_name + ) } pub fn layout(attributes: &[wgpu::VertexAttribute]) -> wgpu::VertexBufferLayout {