move to GLSL (rip rust-gpu 😭)

This commit is contained in:
zack 2025-01-12 16:25:52 -05:00
parent c1df7bf365
commit d4623ab21f
No known key found for this signature in database
GPG key ID: EE8A2B709E2401D1
14 changed files with 457 additions and 486 deletions

View file

@ -2,13 +2,23 @@
use spirv_std::glam::{Mat4, Vec3, Vec4};
#[repr(C)]
#[derive(Clone, Copy, Debug)]
#[repr(C, align(16))]
pub struct Material {
pub base_color: Vec4,
pub metallic_factor: f32,
pub roughness_factor: f32,
pub _padding: [f32; 2],
}
#[repr(C, align(16))]
#[derive(Clone)]
pub struct UniformBufferObject {
pub model: Mat4,
pub view: Mat4,
pub proj: Mat4,
pub model_color: Vec3,
// pub camera_pos: Vec3,
// pub material: Material,
}
#[repr(C)]