Struct amethyst_renderer::PointLight[][src]

#[repr(C)]
pub struct PointLight { pub center: [f32; 3], pub color: Rgba, 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. Below is equation 26, which we used for the lighting evaluation.

equation

The Point properties below map like so:

  • I = intensity
  • lightRadius = radius
  • n = smoothness

Fields

Location of the light source in three dimensional space.

Color of the light in RGBA8 format.

Brightness of the light source, in lumens.

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 Clone for PointLight
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Pod for PointLight
[src]

impl Structure<ConstFormat> for PointLight
[src]

Get the layout of an element by name.

impl Debug for PointLight
[src]

Formats the value using the given formatter. Read more

impl PartialEq for PointLight
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl Default for PointLight
[src]

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

impl From<PointLight> for Light
[src]

Performs the conversion.

Auto Trait Implementations

impl Send for PointLight

impl Sync for PointLight