Struct amethyst_renderer::PointLight
[−]
[src]
pub struct PointLight { pub center: [f32; 3], pub color: [f32; 4], pub intensity: f32, pub radius: f32, pub smoothness: f32, }
A point light source.
Lighting calculations are based off of the Frostbite engine's lighting,
which is explained in detail here in this presentation. The particular
equation used for our calculations is Eq. 26, and the PointLight
properties below map like so:
- I =
intensity
- radius =
radius
- n =
smoothness
Fields
center: [f32; 3]
Coordinates of the light source in three dimensional space.
color: [f32; 4]
Color of the light.
intensity: f32
Brightness of the light source.
radius: f32
Maximum radius of the point light's affected area.
smoothness: f32
Smoothness of the light-to-dark transition from the center to the radius.
Trait Implementations
impl Copy for PointLight
[src]
impl Clone for PointLight
[src]
fn clone(&self) -> PointLight
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more
impl Debug for PointLight
[src]
impl Default for PointLight
[src]
fn default() -> PointLight
Returns the "default value" for a type. Read more
impl Component for PointLight
[src]
type Storage = VecStorage<PointLight>
Associated storage type for this component.