do not use a nested loop for tonemapping