#[repr(u32)]pub enum MaterialParam {
Show 16 variants
Unknown = 0,
Float = 1,
Color128 = 2,
Vec2 = 3,
Vec3 = 4,
Vec4 = 5,
Matrix = 6,
Texture = 7,
Int = 8,
Int2 = 9,
Int3 = 10,
Int4 = 11,
UInt = 12,
UInt2 = 13,
UInt3 = 14,
UInt4 = 15,
}
Expand description
TODO: v0.4 This may need significant revision? What type of data does this material parameter need? This is used to tell the shader how large the data is, and where to attach it to on the shader. https://stereokit.net/Pages/StereoKit/MaterialParam.html
Variants§
Unknown = 0
This data type is not currently recognized. Please report your case on GitHub Issues!
Float = 1
A single 32 bit float value
Color128 = 2
A color value described by 4 floating point values. Memory-wise this is the same as a Vector4, but in the shader this variable has a ‘:color’ tag applied to it using StereoKits’s shader info syntax, indicating it’s a color value. Color values for shaders should be in linear space, not gamma.
Vec2 = 3
A 2 component vector composed of floating point values
Vec3 = 4
A 3 component vector composed of floating point values
Vec4 = 5
A 4 component vector composed of floating point values
Matrix = 6
A 4x4 matrix of floats.
Texture = 7
Texture information!
Int = 8
An i32, or 1 component array composed of i32 values
Int2 = 9
A 2 component array composed of i32 values
Int3 = 10
A 3 component array composed of i32 values
Int4 = 11
A 4 component array composed of i32 values
UInt = 12
A u32, or 1 component array composed of u32 values
UInt2 = 13
A 2 component array composed of u32 values
UInt3 = 14
A 3 component array composed of u32 values
UInt4 = 15
A 4 component array composed of u32 values
Trait Implementations§
Source§impl Clone for MaterialParam
impl Clone for MaterialParam
Source§fn clone(&self) -> MaterialParam
fn clone(&self) -> MaterialParam
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for MaterialParam
impl Debug for MaterialParam
Source§impl PartialEq for MaterialParam
impl PartialEq for MaterialParam
impl Copy for MaterialParam
impl Eq for MaterialParam
impl StructuralPartialEq for MaterialParam
Auto Trait Implementations§
impl Freeze for MaterialParam
impl RefUnwindSafe for MaterialParam
impl Send for MaterialParam
impl Sync for MaterialParam
impl Unpin for MaterialParam
impl UnwindSafe for MaterialParam
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.