differt.utils.smoothing_function#
- smoothing_function(x, /, smoothing_factor=1.0)[source]#
Return a smoothed approximation of the Heaviside step function.
This function is used internally for smoothing-out discontinuities in Ray Tracing, see Smoothing Discontinuities for Fully Differentiable Ray Tracing.
- Parameters:
x (
Float[ArrayLike, '*#batch']) – The input array.smoothing_factor (
Float[ArrayLike, '*#batch']) – The slope—or scaling—parameter, also noted \(\alpha\).
- Return type:
- Returns:
The output of the smoothing function.