Parameterized smoothing function