pub fn stratified_sample(
t_near: f32,
t_far: f32,
n_samples: usize,
rng: &mut LcgRng,
) -> NerfResult<Vec<f32>>Expand description
Sample n_samples positions along a ray between t_near and t_far
using stratified (jittered) sampling.
t_i = t_near + (i + U(0,1)) / n_samples * (t_far - t_near) for i = 0..n_samples
§Errors
Returns InvalidBounds if t_far <= t_near,
InvalidSampleCount if n_samples == 0.