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.
The Point
properties below map like so:
- I =
intensity
- lightRadius =
radius
- n =
smoothness
Fields
center: [f32; 3]
Location of the light source in three dimensional space.
color: Rgba
Color of the light in RGBA8 format.
intensity: f32
Brightness of the light source, in lumens.
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 Clone for PointLight
[src]
fn clone(&self) -> PointLight
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Pod for PointLight
[src]
impl Structure<ConstFormat> for PointLight
[src]
fn query(field_name: &str) -> Option<Element<ConstFormat>>
[src]
Get the layout of an element by name.
impl Debug for PointLight
[src]
impl PartialEq for PointLight
[src]
fn eq(&self, __arg_0: &PointLight) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &PointLight) -> bool
[src]
This method tests for !=
.