Skip to main content

project_to_sh

Function project_to_sh 

Source
pub fn project_to_sh(sample_fn: impl Fn(Vec3) -> Vec3, n_samples: usize) -> Sh3
Expand description

Monte Carlo projection of a spherical function onto SH3 basis.

sample_fn — callable that returns the RGB radiance for a given direction. n_samples — number of uniform sphere samples.