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

Coordinates of the light source in three dimensional space.

Color of the light.

Brightness of the light source.

Maximum radius of the point light's affected area.

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]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Debug for PointLight
[src]

Formats the value using the given formatter.

impl Default for PointLight
[src]

Returns the "default value" for a type. Read more

impl Component for PointLight
[src]

Associated storage type for this component.