Skip to content

struct

Light

pub struct Light {
    pub direction: Vec3,
    pub color: Color,
    pub intensity: f32,
    pub ambient: f32,
    pub sky: Color,
    pub ground: Color,
    pub shadow: Option<Shadow>,
}

A directional key light plus hemisphere (sky/ground) ambient light. direction points towards the light.

Fields

direction

pub direction: Vec3

Points towards the light.

color

pub color: Color

The key light's colour.

intensity

pub intensity: f32

Key-light strength.

ambient

pub ambient: f32

The strength of the ambient light.

sky

pub sky: Color

The ambient light from above.

ground

pub ground: Color

The ambient light from below.

shadow

pub shadow: Option<Shadow>

Its shadows, if it casts them.

Trait implementations