Enum blender_mesh::MaterialInput [−][src]
An input to a material property.
This can either be some uniform value that will get used across all vertices / fragments in your shader, or a texture.
Variants
Some value that is uniform across all vertices / fragments in your mesh.
The name of the texture image (excluding the full path) from an image texture node in Blender’s material editor.
So a texture stored at /Users/me/hello-world.png becomes MaterialInput::Texture(“hello-world.png”.to_string())
This means that it is important to have different texture names across all unique textures in your application.
Note
This is different from the other built in texture nodes, such as brick texture and sky texture. We do not currently support these. If these would be useful for you, open an issue!
Examples
// Metalness can be read from the green channel of metal.jpg use blender_mesh::{MaterialInput, Channel}; let metalness: MaterialInput<f32, (String, Channel)> = MaterialInput::ImageTexture((String::from("metal.jpg"), Channel::Green));
Trait Implementations
impl<U: Clone, I: Clone> Clone for MaterialInput<U, I>
[src]
fn clone(&self) -> MaterialInput<U, I>
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<U: Debug, I: Debug> Debug for MaterialInput<U, I>
[src]
impl<U, I> Default for MaterialInput<U, I> where
U: Default,
[src]
U: Default,
impl<'de, U, I> Deserialize<'de> for MaterialInput<U, I> where
U: Deserialize<'de>,
I: Deserialize<'de>,
[src]
U: Deserialize<'de>,
I: Deserialize<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
impl<U: PartialEq, I: PartialEq> PartialEq<MaterialInput<U, I>> for MaterialInput<U, I>
[src]
fn eq(&self, other: &MaterialInput<U, I>) -> bool
[src]
fn ne(&self, other: &MaterialInput<U, I>) -> bool
[src]
impl<U, I> Serialize for MaterialInput<U, I> where
U: Serialize,
I: Serialize,
[src]
U: Serialize,
I: Serialize,
fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error> where
__S: Serializer,
[src]
__S: Serializer,
impl<U, I> StructuralPartialEq for MaterialInput<U, I>
[src]
Auto Trait Implementations
impl<U, I> RefUnwindSafe for MaterialInput<U, I> where
I: RefUnwindSafe,
U: RefUnwindSafe,
I: RefUnwindSafe,
U: RefUnwindSafe,
impl<U, I> Send for MaterialInput<U, I> where
I: Send,
U: Send,
I: Send,
U: Send,
impl<U, I> Sync for MaterialInput<U, I> where
I: Sync,
U: Sync,
I: Sync,
U: Sync,
impl<U, I> Unpin for MaterialInput<U, I> where
I: Unpin,
U: Unpin,
I: Unpin,
U: Unpin,
impl<U, I> UnwindSafe for MaterialInput<U, I> where
I: UnwindSafe,
U: UnwindSafe,
I: UnwindSafe,
U: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<SS, SP> SupersetOf<SS> for SP where
SS: SubsetOf<SP>,
SS: SubsetOf<SP>,
pub fn to_subset(&self) -> Option<SS>
pub fn is_in_subset(&self) -> bool
pub fn to_subset_unchecked(&self) -> SS
pub fn from_subset(element: &SS) -> SP
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,