pub enum ParamValue {
Texture(RawAssetHandle),
Cubemap(RawAssetHandle),
Sampler(SamplerKind),
Float(f32),
Vec4([f32; 4]),
Bytes(Vec<u8>),
}Expand description
The small, closed vocabulary of value kinds a material instance parameter can be. Arrays instead of a math-library type so this module has no dependency beyond wgpu itself — convert to/from your own vector type at the call site.
Variants§
Texture(RawAssetHandle)
Cubemap(RawAssetHandle)
Sampler(SamplerKind)
Float(f32)
Vec4([f32; 4])
Bytes(Vec<u8>)
Escape hatch: raw bytes for anything not covered above (e.g. a custom struct of several packed values).
Auto Trait Implementations§
impl Freeze for ParamValue
impl RefUnwindSafe for ParamValue
impl Send for ParamValue
impl Sync for ParamValue
impl Unpin for ParamValue
impl UnsafeUnpin for ParamValue
impl UnwindSafe for ParamValue
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
Mutably borrows from an owned value. Read more