Rust shaders
This commit is contained in:
34
gpu_shared/src/lib.rs
Normal file
34
gpu_shared/src/lib.rs
Normal 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],
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user