enum
Uniform
pub enum Uniform {
Float(f32),
Int(i32),
Bool(bool),
Vec2([f32; 2]),
Vec3([f32; 3]),
Vec4([f32; 4]),
Mat4([f32; 16]),
Vec3Array(Vec<[f32; 3]>),
Texture(TextureRef),
}A shader uniform's value.
Variants
Methods
parse
pub fn parse(text: &str) -> Option<Uniform>A value from template text: 0.3 → float, "#22d3ee" → vec3 (vec4 with alpha), "1 2" / "1, 2, 3" → vecN, true → bool.