This commit is contained in:
zack 2024-12-29 20:00:14 -05:00
parent 0877a91373
commit 9845d5717b
No known key found for this signature in database
GPG key ID: 5F873416BCF59F35
12 changed files with 903 additions and 148 deletions

View file

@ -4,4 +4,5 @@ version = "0.1.0"
edition = "2021"
[dependencies]
glam.workspace = true
spirv-std.workspace = true
bytemuck.workspace = true

View file

@ -1,6 +1,6 @@
#![cfg_attr(target_arch = "spirv", no_std)]
use glam::{Mat4, Vec3};
use spirv_std::glam::{Mat4, Vec3, Vec4};
#[repr(C)]
#[derive(Clone)]
@ -10,3 +10,12 @@ pub struct UniformBufferObject {
pub proj: Mat4,
pub model_color: Vec3,
}
#[repr(C)]
#[derive(Debug, Clone, Copy)]
pub struct PushConstants {
pub texture_size: Vec4,
}
unsafe impl bytemuck::Pod for PushConstants {}
unsafe impl bytemuck::Zeroable for PushConstants {}