R2 Shaders
|
Functions and types related to directional lighting. More...
Go to the source code of this file.
Data Structures | |
struct | R2_light_directional_vectors_t |
Vectors used when calculating directional lighting. More... | |
struct | R2_light_directional_t |
A directional light type. More... | |
Functions | |
R2_light_directional_vectors_t | R2_lightDirectionalVectors (const R2_light_directional_t light, const vec3 p, const vec3 n) |
vec3 | R2_lightDirectionalDiffuseTerm (const R2_light_directional_t light, const R2_light_directional_vectors_t v) |
vec3 | R2_lightDirectionalSpecularTerm (const R2_light_directional_t light, const R2_light_directional_vectors_t v, const vec3 specular_color, const float specular_exponent) |
Functions and types related to directional lighting.
Definition in file R2LightDirectional.h.
vec3 R2_lightDirectionalDiffuseTerm | ( | const R2_light_directional_t | light, |
const R2_light_directional_vectors_t | v | ||
) |
Calculate the diffuse term for a directional light.
light | The light parameters |
v | The calculated light vectors |
Definition at line 59 of file R2LightDirectional.h.
vec3 R2_lightDirectionalSpecularTerm | ( | const R2_light_directional_t | light, |
const R2_light_directional_vectors_t | v, | ||
const vec3 | specular_color, | ||
const float | specular_exponent | ||
) |
Calculate the specular term for a directional light
light | The light parameters |
v | The calculated light vectors |
specular_color | The surface specular color |
specular_exponent | The surface specular exponent |
Definition at line 77 of file R2LightDirectional.h.
R2_light_directional_vectors_t R2_lightDirectionalVectors | ( | const R2_light_directional_t | light, |
const vec3 | p, | ||
const vec3 | n | ||
) |
Calculate the vectors required to calculate directional lighting.
light | The light parameters |
p | The surface position |
n | The surface normal |
Definition at line 40 of file R2LightDirectional.h.