class DirectionalLight
Defined at line 18 of file ../../src/ui/lib/escher/scene/directional_light.h
Directional light is emitted from a particular point at infinity.
Although the light is directional, the light has some amount of angular
dispersion (i.e., the light is not fully columnated). For simplicity, we
assume the dispersion of the light source is symmetric about the light's
primary direction.
Public Methods
void DirectionalLight ()
Defined at line 15 of file ../../src/ui/lib/escher/scene/directional_light.cc
void DirectionalLight (vec3 direction, float dispersion, vec3 color)
Direction vector must be normalized.
Defined at line 17 of file ../../src/ui/lib/escher/scene/directional_light.cc
const vec3 & direction ()
The direction that the light travels.
Defined at line 30 of file ../../src/ui/lib/escher/scene/directional_light.h
void DirectionalLight (vec2 polar_direction, float dispersion, vec3 color)
Direction is as described for the polar_direction() accessor.
Defined at line 30 of file ../../src/ui/lib/escher/scene/directional_light.cc
const vec2 & polar_direction ()
The direction from which the light is received. The first coordinate is
theta (the azimuthal angle, in radians) and the second coordinate is
phi (the polar angle, in radians).
Defined at line 35 of file ../../src/ui/lib/escher/scene/directional_light.h
void ~DirectionalLight ()
Defined at line 37 of file ../../src/ui/lib/escher/scene/directional_light.cc
float dispersion ()
The angular variance in the light, in radians.
TODO(https://fxbug.dev/42097874): it's not well-defined how rendering should/will respond to
this value. Its meaning is implicitly defined by implementation of
SsdoSampler, but it's not clear how/if it will be taken into account for
e.g. shadow-map-based soft shadows.
Defined at line 42 of file ../../src/ui/lib/escher/scene/directional_light.h
const vec3 & color ()
The amount of light emitted.
TODO(https://fxbug.dev/42097875): In what units?
Defined at line 46 of file ../../src/ui/lib/escher/scene/directional_light.h
void set_color (vec3 color)
Defined at line 47 of file ../../src/ui/lib/escher/scene/directional_light.h
float intensity ()
TODO(https://fxbug.dev/42097854): deprecated. Only used for SSDO shadows, and white lights.
Defined at line 50 of file ../../src/ui/lib/escher/scene/directional_light.h