fix createSmoothTonemap function