Rust shaders

This commit is contained in:
2026-01-11 13:07:57 +01:00
parent 255c2097d5
commit f55812a3c0
388 changed files with 1790 additions and 61 deletions

34
gpu_shared/src/lib.rs Normal file
View File

@ -0,0 +1,34 @@
#![no_std]
use bytemuck::{Pod, Zeroable};
#[derive(Clone, Copy, Pod, Zeroable)]
#[repr(C)]
pub struct RayMarchingPushConstants
{
pub view_projection: glam::Mat4,
pub transform: glam::Mat4,
pub root_color: glam::Vec4,
pub eye_position: glam::Vec3,
pub root_subdivided: u32,
}
mod voxel_4tree
{
#[derive(Clone, Copy, Pod, Zeroable)]
#[repr(C)]
pub struct Chunk {}
#[derive(Clone, Copy, Pod, Zeroable)]
#[repr(C)]
pub struct StructureTile
{
children: [u32; 64],
}
#[derive(Clone, Copy, Pod, Zeroable)]
#[repr(C)]
pub struct ColorTile
{
children: [u32; 64],
}
}