Skip to main content

sample_weight

Function sample_weight 

Source
pub fn sample_weight(i: usize, n: usize, falloff: f32) -> f32
Expand description

Compute the opacity weight for the i-th sample in a blur of N samples.

i is 0 = closest to actual position, N-1 = farthest (the tail). falloff in [0, 1] controls how quickly weight drops off.