pub fn ambient_occlusion_sample(
hit: &HitRecord,
triangles: &[GpuTriangle],
n_samples: usize,
) -> f32Expand description
Estimate ambient occlusion at a hit point by sampling hemisphere directions.
n_samples rays are fired in directions cosine-weighted around hit.normal.
Returns the fraction of rays that are not occluded (1.0 = fully lit).