pub struct Material {
pub mat_type: MaterialType,
pub albedo: [f64; 3],
pub roughness: f64,
pub metallic: f64,
pub ior: f64,
pub emission: [f64; 3],
pub shininess: f64,
pub ao: f64,
}Expand description
A material definition for ray tracing.
Fields§
§mat_type: MaterialTypeMaterial type.
albedo: [f64; 3]Albedo / base color.
roughness: f64Roughness (0=smooth, 1=rough) for metal/PBR.
metallic: f64Metallic factor (0=dielectric, 1=metal) for PBR.
ior: f64Index of refraction for dielectric.
emission: [f64; 3]Emission color and strength.
shininess: f64Specular exponent for Phong.
ao: f64Ambient occlusion factor.
Implementations§
Trait Implementations§
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more