18 lines
539 B
C
18 lines
539 B
C
#ifndef GGX_MULTI_SCATTER_H
|
|
#define GGX_MULTI_SCATTER_H
|
|
|
|
#include "Common.h"
|
|
#include "cglm/struct/vec3.h"
|
|
|
|
// Initialize the tiny LUT. Safe to call multiple times.
|
|
void ggx_ms_init_lut_once(void);
|
|
|
|
// Heitz-style multiple-scattering GGX approximation (Smith model).
|
|
// Returns a broad lobe (Lambertian-shaped in shading space).
|
|
vec3s ggx_multi_scatter_lambert(vec3s f0, float NoV, float NoL, float roughness);
|
|
|
|
// Expose E(NoV, roughness) for lobe mixing / pdfs.
|
|
float ggx_ms_E(float NoV, float roughness);
|
|
|
|
#endif // GGX_MULTI_SCATTER_H
|