pub struct Material<'a> {
pub name: Option<Cow<'a, str>>,
pub pbr_metallic_roughness: Option<PbrMetallicRoughness<'a>>,
pub normal_texture: Option<NormalTextureInfo<'a>>,
pub occlusion_texture: Option<OcclusionTextureInfo<'a>>,
pub emissive_texture: Option<TextureInfo<'a>>,
pub emissive_factor: [f32; 3],
pub alpha_mode: AlphaMode<'a>,
pub alpha_cutoff: f32,
pub double_sided: bool,
pub extensions: Option<Extensions<'a>>,
pub extras: Option<Extras<'a>>,
}Expand description
The material appearence of a primitive.
Fields§
§name: Option<Cow<'a, str>>The user-defined name of this object.
pbr_metallic_roughness: Option<PbrMetallicRoughness<'a>>A set of parameter values that are used to define the metallic-roughness material model from Physically Based Rendering (PBR) methodology.
normal_texture: Option<NormalTextureInfo<'a>>The tangent space normal texture.
occlusion_texture: Option<OcclusionTextureInfo<'a>>The occlusion texture.
emissive_texture: Option<TextureInfo<'a>>The emissive texture.
emissive_factor: [f32; 3]The factors for the emissive color of the material.
alpha_mode: AlphaMode<'a>The alpha rendering mode of the material.
alpha_cutoff: f32The alpha cutoff value of the material.
double_sided: boolSpecifies whether the material is double sided.
extensions: Option<Extensions<'a>>§extras: Option<Extras<'a>>Implementations§
Trait Implementations§
Source§impl<'de: 'a, 'a> Deserialize<'de> for Material<'a>
impl<'de: 'a, 'a> Deserialize<'de> for Material<'a>
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl<'a> Freeze for Material<'a>
impl<'a> RefUnwindSafe for Material<'a>
impl<'a> Send for Material<'a>
impl<'a> Sync for Material<'a>
impl<'a> Unpin for Material<'a>
impl<'a> UnsafeUnpin for Material<'a>
impl<'a> UnwindSafe for Material<'a>
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