#[derive(ShaderValues)]Expand description
Derives ShaderValues for the values a style’s or an effect’s WGSL
reads: the WGSL struct declaring them, and the layout writing each of
them where that struct reads it.
The WGSL struct takes the Rust type’s own name and each field its own, in the order they were written; a field of any other type than these fails to compile, and a type with no fields reads no values and binds none.
| Rust | WGSL |
|---|---|
f32 | f32 |
u32 | u32 |
Vec2 | vec2<f32> |
Vec3 | vec3<f32> |
Vec4 | vec4<f32> |
Mat4 | mat4x4<f32> |
Color | vec4<f32>, linear red, green, blue and alpha |