Implementing basic gamma correction tonemapping