pub struct MaterialPreset;Expand description
Factory methods that return physically plausible PbrMaterial presets for
common real-world materials. All values are based on measured data where
available.
Implementations§
Source§impl MaterialPreset
impl MaterialPreset
Sourcepub fn gold() -> PbrMaterial
pub fn gold() -> PbrMaterial
24-carat gold — high metallic, warm reflectance, low roughness.
Sourcepub fn silver() -> PbrMaterial
pub fn silver() -> PbrMaterial
Polished silver — bright, slightly cold specular.
Sourcepub fn copper() -> PbrMaterial
pub fn copper() -> PbrMaterial
Copper — reddish warm metal.
Sourcepub fn iron() -> PbrMaterial
pub fn iron() -> PbrMaterial
Iron / steel — neutral grey metal, moderate roughness.
Sourcepub fn rubber() -> PbrMaterial
pub fn rubber() -> PbrMaterial
Natural rubber — matte black dielectric.
Sourcepub fn plastic_glossy() -> PbrMaterial
pub fn plastic_glossy() -> PbrMaterial
Glossy plastic — bright coloured dielectric with low roughness.
Sourcepub fn plastic_matte() -> PbrMaterial
pub fn plastic_matte() -> PbrMaterial
Matte plastic — diffuse-dominant dielectric.
Sourcepub fn glass() -> PbrMaterial
pub fn glass() -> PbrMaterial
Clear glass — fully transparent dielectric with strong Fresnel.
Sourcepub fn skin() -> PbrMaterial
pub fn skin() -> PbrMaterial
Human skin — warm SSS, slightly specular.
Sourcepub fn water() -> PbrMaterial
pub fn water() -> PbrMaterial
Still water surface — highly transparent, strong Fresnel at grazing angles.
Sourcepub fn stone() -> PbrMaterial
pub fn stone() -> PbrMaterial
Generic stone — grey, rough, dielectric.
Sourcepub fn concrete() -> PbrMaterial
pub fn concrete() -> PbrMaterial
Poured concrete — very rough, slightly darker than stone.
Sourcepub fn wood() -> PbrMaterial
pub fn wood() -> PbrMaterial
Natural wood — warm, anisotropic grain.
Sourcepub fn fabric() -> PbrMaterial
pub fn fabric() -> PbrMaterial
Woven fabric — very diffuse, soft surface.
Auto Trait Implementations§
impl Freeze for MaterialPreset
impl RefUnwindSafe for MaterialPreset
impl Send for MaterialPreset
impl Sync for MaterialPreset
impl Unpin for MaterialPreset
impl UnsafeUnpin for MaterialPreset
impl UnwindSafe for MaterialPreset
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
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>
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>
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)
&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)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.