Diffusion differentiable resampling