Skip to content

Commit

Permalink
Update instance_data.rs
Browse files Browse the repository at this point in the history
  • Loading branch information
guylamar2006 authored Dec 1, 2024
1 parent 4233df5 commit 4073103
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions neothesia-core/src/render/waterfall/pipeline/instance_data.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
use wgpu_jumpstart::wgpu;

use bytemuck::{Pod, Zeroable};
use wgpu::vertex_attr_array;

Expand All @@ -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 {
Expand Down

0 comments on commit 4073103

Please sign in to comment.