pub struct Material {
pub name: String,
pub base_color: [f32; 4],
pub metallic: f32,
pub roughness: f32,
pub emissive: [f32; 3],
pub double_sided: bool,
pub albedo_texture_id: Option<String>,
pub normal_texture_id: Option<String>,
}Expand description
Simple PBR-style material, maps directly onto glTF pbrMetallicRoughness.
Fields§
§name: String§base_color: [f32; 4]Linear RGBA base color.
metallic: f32§roughness: f32§emissive: [f32; 3]Linear RGB emissive factor.
double_sided: bool§albedo_texture_id: Option<String>Optional albedo/base-color texture path (relative to asset dir).
normal_texture_id: Option<String>Optional normal map texture path (relative to asset dir).
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Material
impl<'de> Deserialize<'de> for Material
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
impl StructuralPartialEq for Material
Auto Trait Implementations§
impl Freeze for Material
impl RefUnwindSafe for Material
impl Send for Material
impl Sync for Material
impl Unpin for Material
impl UnsafeUnpin for Material
impl UnwindSafe for Material
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