tonemap solely based on CIE Y as lightness
replace loop with std::accumulate