The denoising implementaiton was inspired be the paper: Statistical Error Reduction for Monte Carlo Rendering (Supplement).