pub enum Material {
Lit,
Unlit,
Emissive,
Glow,
Glass(Glass),
Volume(Volume),
}Expand description
How a surface’s content meets the scene’s light and what lies behind it.
Variants§
Lit
Shaded by the angle the light falls at, and darkened where a shadow falls on it.
Unlit
The content as it is, as a screen shows it, darkened only where a shadow falls on it.
Emissive
The content at its full colour, as fire or a lamp shows: neither the light nor a shadow changes it.
Glow
Adds the content’s colour to what lies behind it, as light does: a halo, a flame or a spark. It hides nothing, and surfaces nearer the eye hide it.
Glass(Glass)
The scene behind shows through, bent by the surface’s curve, with the light’s highlight on it and the content drawn over it. Glass shows the surfaces that are not glass behind it.
Volume(Volume)
A shape an app’s shader finds inside the mesh, ray by ray, as the camera sees it, with the depth of what each ray meets: the mesh only bounds it. A volume casts no shadow.
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> ErasedDestructor for Twhere
T: 'static,
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> ⓘ
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> ⓘ
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