#include <cglm/cglm.h>
Go to the source code of this file.
◆ sh_eval_irradiance()
| void sh_eval_irradiance |
( |
const vec3 |
normal, |
|
|
const SH9 * |
sh_ptr, |
|
|
vec3 |
out_color |
|
) |
| |
Evaluates the irradiance from SH coefficients in a given direction.
- Parameters
-
| normal | Normalized surface normal. |
| sh_ptr | Pointer to the SH structure. |
| out_color | Output color (vec3). |
◆ sh_project_directional()
| void sh_project_directional |
( |
const vec3 |
dir, |
|
|
const vec3 |
color, |
|
|
SH9 * |
out_sh |
|
) |
| |
Projects a directional light into SH coefficients.
- Parameters
-
| dir | Normalized direction vector pointing TOWARDS the light source. |
| color | Linear RGB color/intensity of the light. |
| out_sh | Pointer to the SH structure to accumulate into. |
◆ sh_zero()
| void sh_zero |
( |
SH9 * |
sh_ptr | ) |
|
Initialize SH coefficients to zero.