|
R2 Shaders
|
Functions and types related to positional lighting. More...

Go to the source code of this file.
Data Structures | |
| struct | R2_light_positional_vectors_t |
| Vectors used when calculating positional lighting. More... | |
| struct | R2_light_positional_t |
| A positional light type. More... | |
Functions | |
| R2_light_positional_vectors_t | R2_lightPositionalVectors (const R2_light_positional_t light, const vec3 p, const vec3 n) |
| float | R2_lightPositionalAttenuation (const R2_light_positional_t light, const float distance) |
Functions and types related to positional lighting.
Definition in file R2LightPositional.h.
| float R2_lightPositionalAttenuation | ( | const R2_light_positional_t | light, |
| const float | distance | ||
| ) |
Given a light at distance from the current point on the lit surface, calculate the amount of attenuation. The returned value is 1.0 for "no attenuation" and 0.0 for "fully attenuated".
| light | The light |
| distance | The distance from the light to the surface |
[0.0, 1.0] Definition at line 78 of file R2LightPositional.h.
| R2_light_positional_vectors_t R2_lightPositionalVectors | ( | const R2_light_positional_t | light, |
| const vec3 | p, | ||
| const vec3 | n | ||
| ) |
Calculate the vectors required to calculate positional lighting.
| light | The light parameters |
| p | The surface position (eye-space) |
| n | The surface normal (eye-space) |
Definition at line 46 of file R2LightPositional.h.
1.8.12