Adding hdr and tonemap code