[−][src]Struct crystal_engine::LightColor
The color of the light. This is divided in 3 fields: ambient, diffuse and specular. See each field for the definition.
For more information, see the amazing tutorial at https://learnopengl.com/Lighting/Colors
Fields
ambient: Vector3<f32>
Even when it is dark there is usually still some light somewhere in the world (the moon, a distant light) so objects are almost never completely dark. To simulate this we use an ambient lighting constant that always gives the object some color.
This will be merged with the ambient factor of the material of your model.
diffuse: Vector3<f32>
Diffuse light simulates the directional impact a light object has on an object. This is the most visually significant component of the lighting model. The more a part of an object faces the light source, the brighter it becomes.
This will be merged with the diffuse factor of the material of your model.
specular: Vector3<f32>
Specular light simulates the bright spot of a light that appears on shiny objects. Specular highlights are more inclined to the color of the light than the color of the object.
This will be merged with the specular factor of the material of your model.
Trait Implementations
impl Default for LightColor
[src]
Auto Trait Implementations
impl RefUnwindSafe for LightColor
impl Send for LightColor
impl Sync for LightColor
impl Unpin for LightColor
impl UnwindSafe for LightColor
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Content for T
[src]
fn ref_from_ptr(ptr: *mut c_void, size: usize) -> Option<*mut T>
[src]
fn is_size_suitable(size: usize) -> bool
[src]
fn indiv_size() -> usize
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> SafeBorrow<T> for T
[src]
impl<T> SetParameter for T
fn set<T>(&mut self, value: T) -> <T as Parameter<Self>>::Result where
T: Parameter<Self>,
T: Parameter<Self>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,