pub struct PbrMaterial {
pub name: String,
pub albedo: [f32; 4],
pub metallic: f32,
pub roughness: f32,
pub emissive: [f32; 3],
pub normal_scale: f32,
pub alpha_cutoff: f32,
pub albedo_texture: Option<usize>,
pub metallic_roughness_texture: Option<usize>,
pub normal_texture: Option<usize>,
pub emissive_texture: Option<usize>,
}Expand description
Describes a PBR material
Fields§
§name: String§albedo: [f32; 4]§metallic: f32§roughness: f32§emissive: [f32; 3]§normal_scale: f32§alpha_cutoff: f32§albedo_texture: Option<usize>Texture indices (into a TextureCache)
metallic_roughness_texture: Option<usize>§normal_texture: Option<usize>§emissive_texture: Option<usize>Trait Implementations§
Source§impl Clone for PbrMaterial
impl Clone for PbrMaterial
Source§fn clone(&self) -> PbrMaterial
fn clone(&self) -> PbrMaterial
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for PbrMaterial
impl Debug for PbrMaterial
Auto Trait Implementations§
impl Freeze for PbrMaterial
impl RefUnwindSafe for PbrMaterial
impl Send for PbrMaterial
impl Sync for PbrMaterial
impl Unpin for PbrMaterial
impl UnsafeUnpin for PbrMaterial
impl UnwindSafe for PbrMaterial
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