Implementing HDR lighting with tone mapping