pub struct MaterialParams {
pub base_color: Vec4,
pub metallic: f32,
pub roughness: f32,
pub fresnel_f0: f32,
pub sss_intensity: f32,
pub emission_color: Vec3,
pub emission_strength: f32,
pub ior: f32,
pub anisotropy: f32,
pub subsurface_color: Vec3,
}Expand description
Full PBR parameter set for a material.
Fields§
§base_color: Vec4RGBA base colour (alpha = opacity for glass/transparent surfaces).
metallic: f320 = dielectric, 1 = metal.
roughness: f32Perceptual roughness [0, 1].
fresnel_f0: f32Schlick F0 reflectance at normal incidence.
sss_intensity: f32Sub-surface scattering weight [0, 1].
emission_color: Vec3Emission RGB (pre-tonemapped).
emission_strength: f32Emission multiplier (values > 1 bloom-clip).
ior: f32Index of refraction (for glass, water, cornea).
anisotropy: f32GGX anisotropy [0, 1].
subsurface_color: Vec3Subsurface tint colour.
Implementations§
Trait Implementations§
Source§impl Clone for MaterialParams
impl Clone for MaterialParams
Source§impl Debug for MaterialParams
impl Debug for MaterialParams
Source§impl Default for MaterialParams
impl Default for MaterialParams
Source§impl PartialEq for MaterialParams
impl PartialEq for MaterialParams
impl StructuralPartialEq for MaterialParams
Auto Trait Implementations§
impl Freeze for MaterialParams
impl RefUnwindSafe for MaterialParams
impl Send for MaterialParams
impl Sync for MaterialParams
impl Unpin for MaterialParams
impl UnsafeUnpin for MaterialParams
impl UnwindSafe for MaterialParams
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.