pub enum MaterialValue {
Show 25 variants Bool(bool), Vec2B(Vec2<bool>), Vec3B(Vec3<bool>), Vec4B(Vec4<bool>), Mat2B(Mat2<bool>), Mat3B(Mat3<bool>), Mat4B(Mat4<bool>), Scalar(f32), Vec2F(Vec2<f32>), Vec3F(Vec3<f32>), Vec4F(Vec4<f32>), Mat2F(Mat2<f32>), Mat3F(Mat3<f32>), Mat4F(Mat4<f32>), Integer(i32), Vec2I(Vec2<i32>), Vec3I(Vec3<i32>), Vec4I(Vec4<i32>), Mat2I(Mat2<i32>), Mat3I(Mat3<i32>), Mat4I(Mat4<i32>), Sampler2d { reference: ImageReference, filtering: ImageFiltering, }, Sampler2dArray { reference: ImageReference, filtering: ImageFiltering, }, Sampler3d { reference: ImageReference, filtering: ImageFiltering, }, Array(Vec<MaterialValue>),
}

Variants§

§

Bool(bool)

§

Vec2B(Vec2<bool>)

§

Vec3B(Vec3<bool>)

§

Vec4B(Vec4<bool>)

§

Mat2B(Mat2<bool>)

§

Mat3B(Mat3<bool>)

§

Mat4B(Mat4<bool>)

§

Scalar(f32)

§

Vec2F(Vec2<f32>)

§

Vec3F(Vec3<f32>)

§

Vec4F(Vec4<f32>)

§

Mat2F(Mat2<f32>)

§

Mat3F(Mat3<f32>)

§

Mat4F(Mat4<f32>)

§

Integer(i32)

§

Vec2I(Vec2<i32>)

§

Vec3I(Vec3<i32>)

§

Vec4I(Vec4<i32>)

§

Mat2I(Mat2<i32>)

§

Mat3I(Mat3<i32>)

§

Mat4I(Mat4<i32>)

§

Sampler2d

Fields

§reference: ImageReference
§filtering: ImageFiltering
§

Sampler2dArray

Fields

§reference: ImageReference
§filtering: ImageFiltering
§

Sampler3d

Fields

§reference: ImageReference
§filtering: ImageFiltering
§

Array(Vec<MaterialValue>)

Implementations§

source§

impl MaterialValue

source

pub fn sampler_2d(reference: ImageReference) -> Self

source

pub fn sampler_2d_filter( reference: ImageReference, filtering: ImageFiltering ) -> Self

source

pub fn sampler_2d_array(reference: ImageReference) -> Self

source

pub fn sampler_2d_array_filter( reference: ImageReference, filtering: ImageFiltering ) -> Self

source

pub fn sampler_3d(reference: ImageReference) -> Self

source

pub fn sampler_3d_filter( reference: ImageReference, filtering: ImageFiltering ) -> Self

source

pub fn value_type(&self) -> MaterialValueType

source

pub fn update_references(&mut self, image_mapping: &ImageResourceMapping)

Trait Implementations§

source§

impl Clone for MaterialValue

source§

fn clone(&self) -> MaterialValue

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for MaterialValue

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for MaterialValue

source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl From<Mat2<bool>> for MaterialValue

source§

fn from(v: Mat2<bool>) -> Self

Converts to this type from the input type.
source§

impl From<Mat2<f32>> for MaterialValue

source§

fn from(v: Mat2<f32>) -> Self

Converts to this type from the input type.
source§

impl From<Mat2<i32>> for MaterialValue

source§

fn from(v: Mat2<i32>) -> Self

Converts to this type from the input type.
source§

impl From<Mat3<bool>> for MaterialValue

source§

fn from(v: Mat3<bool>) -> Self

Converts to this type from the input type.
source§

impl From<Mat3<f32>> for MaterialValue

source§

fn from(v: Mat3<f32>) -> Self

Converts to this type from the input type.
source§

impl From<Mat3<i32>> for MaterialValue

source§

fn from(v: Mat3<i32>) -> Self

Converts to this type from the input type.
source§

impl From<Mat4<bool>> for MaterialValue

source§

fn from(v: Mat4<bool>) -> Self

Converts to this type from the input type.
source§

impl From<Mat4<f32>> for MaterialValue

source§

fn from(v: Mat4<f32>) -> Self

Converts to this type from the input type.
source§

impl From<Mat4<i32>> for MaterialValue

source§

fn from(v: Mat4<i32>) -> Self

Converts to this type from the input type.
source§

impl From<MaterialValue> for MaterialGraphNode

source§

fn from(node: MaterialValue) -> Self

Converts to this type from the input type.
source§

impl From<Vec<MaterialValue, Global>> for MaterialValue

source§

fn from(v: Vec<MaterialValue>) -> Self

Converts to this type from the input type.
source§

impl From<Vec2<bool>> for MaterialValue

source§

fn from(v: Vec2<bool>) -> Self

Converts to this type from the input type.
source§

impl From<Vec2<f32>> for MaterialValue

source§

fn from(v: Vec2<f32>) -> Self

Converts to this type from the input type.
source§

impl From<Vec2<i32>> for MaterialValue

source§

fn from(v: Vec2<i32>) -> Self

Converts to this type from the input type.
source§

impl From<Vec3<bool>> for MaterialValue

source§

fn from(v: Vec3<bool>) -> Self

Converts to this type from the input type.
source§

impl From<Vec3<f32>> for MaterialValue

source§

fn from(v: Vec3<f32>) -> Self

Converts to this type from the input type.
source§

impl From<Vec3<i32>> for MaterialValue

source§

fn from(v: Vec3<i32>) -> Self

Converts to this type from the input type.
source§

impl From<Vec4<bool>> for MaterialValue

source§

fn from(v: Vec4<bool>) -> Self

Converts to this type from the input type.
source§

impl From<Vec4<f32>> for MaterialValue

source§

fn from(v: Vec4<f32>) -> Self

Converts to this type from the input type.
source§

impl From<Vec4<i32>> for MaterialValue

source§

fn from(v: Vec4<i32>) -> Self

Converts to this type from the input type.
source§

impl From<bool> for MaterialValue

source§

fn from(v: bool) -> Self

Converts to this type from the input type.
source§

impl From<f32> for MaterialValue

source§

fn from(v: f32) -> Self

Converts to this type from the input type.
source§

impl From<i32> for MaterialValue

source§

fn from(v: i32) -> Self

Converts to this type from the input type.
source§

impl PartialEq<MaterialValue> for MaterialValue

source§

fn eq(&self, other: &MaterialValue) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl Serialize for MaterialValue

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl ToString for MaterialValue

source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
source§

impl StructuralPartialEq for MaterialValue

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> Finalize for T

§

unsafe fn finalize_raw(data: *mut ())

Safety Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

§

impl<T> Pointable for T

§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> ToOwned for Twhere T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for Twhere V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> Component for Twhere T: Send + Sync + 'static,

source§

impl<T> DeserializeOwned for Twhere T: for<'de> Deserialize<'de>,