pub struct Material { /* private fields */ }Expand description
A material describing how a surface responds to illumination.
Implementations§
Source§impl Material
Implements factory constructors for Material.
impl Material
Implements factory constructors for Material.
Sourcepub fn pbr(albedo: Vector3D) -> Material
pub fn pbr(albedo: Vector3D) -> Material
Creates a material using the MaterialKind::Pbr approximation.
The resulting material is shaded as a Lambertian diffuse term scaled
by a Schlick fresnel factor; its specular and shininess fields are
not consulted on that path. See MaterialKind::Pbr for what this
model does and does not include.
§Arguments
Vector3D- The diffuse albedo color.
§Returns
Material- A PBR-approximation material.
Trait Implementations§
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