From c29555bddac1c0027bf6e15d91e219adaa088065 Mon Sep 17 00:00:00 2001 From: Micha White Date: Sat, 24 Sep 2022 18:20:46 -0400 Subject: Implemented a camera --- src/instance.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/instance.rs') diff --git a/src/instance.rs b/src/instance.rs index 554d02d..6ea5321 100644 --- a/src/instance.rs +++ b/src/instance.rs @@ -15,7 +15,7 @@ pub struct Instance { /// Rotation, in radians pub rotation: f32, /// z-index - pub z_index: i32, + pub z_index: u32, } impl Default for Instance { @@ -32,7 +32,7 @@ impl Default for Instance { impl Instance { // whenever this is updated, please also update `sprite.wgsl` const ATTRIBUTES: [wgpu::VertexAttribute; 4] = - wgpu::vertex_attr_array![1 => Float32x2, 2 => Float32x2, 3 => Float32, 4 => Sint32]; + wgpu::vertex_attr_array![1 => Float32x2, 2 => Float32x2, 3 => Float32, 4 => Uint32]; pub(crate) fn desc<'a>() -> wgpu::VertexBufferLayout<'a> { // make sure these two don't conflict -- cgit v1.2.3