[−][src]Enum blender_mesh::MaterialInput
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
Uniform(U)
Some value that is uniform across all vertices / fragments in your mesh.
ImageTexture(I)
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: 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> Default for MaterialInput<U, I> where
U: Default,
[src]
U: Default,
impl<U: Debug, I: Debug> Debug for MaterialInput<U, I>
[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<'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>,
Auto Trait Implementations
impl<U, I> Send for MaterialInput<U, I> where
I: Send,
U: Send,
I: Send,
U: Send,
impl<U, I> Unpin for MaterialInput<U, I> where
I: Unpin,
U: Unpin,
I: Unpin,
U: Unpin,
impl<U, I> Sync for MaterialInput<U, I> where
I: Sync,
U: Sync,
I: Sync,
U: Sync,
impl<U, I> UnwindSafe for MaterialInput<U, I> where
I: UnwindSafe,
U: UnwindSafe,
I: UnwindSafe,
U: UnwindSafe,
impl<U, I> RefUnwindSafe for MaterialInput<U, I> where
I: RefUnwindSafe,
U: RefUnwindSafe,
I: RefUnwindSafe,
U: RefUnwindSafe,
Blanket Implementations
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
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.
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.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> DeserializeOwned for T where
T: Deserialize<'de>,
[src]
T: Deserialize<'de>,
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>,