Expand description
Procedural macros for deriving shader attribute implementations.
Provides #[derive(Attribute)] and #[derive(AttributeGlobal)] for named and
tuple structs. These describe vertex/instance attributes, not uniform packing.
§Examples
use wgame_shader_macros::{Attribute, AttributeGlobal};
#[derive(Attribute)]
struct Vertex {
position: [f32; 3],
normal: [f32; 3],
}
#[derive(AttributeGlobal)]
struct InstanceTransforms {
projection: glam::Mat4,
view: glam::Mat4,
}Derive Macros§
- Attribute
- Derives vertex/instance attributes using the canonical
wgame_shaderpath. - Attribute
Global - Derives vertex/instance attributes using the canonical
wgame::shaderpath.