I've been looking up this question on the internet for a while, and I haven't been very successful, so I decided I'll ask it here. Should I apply tone mapping before gamma correction, gamma correction before tone mapping, or should I just use one or the other?


This depends on your calculations really, since you can do it either way. However, probably when you reach tone mapping you will be in linear space (i.e. no gamma correction has been done yet and you don't assume non-linear space for your calculations). Assuming this, gamma correction should be applied after tone mapping, otherwise you have "linear" tone mapping on non-linear color values.

To quote from Real-Time Rendering 3rd by Möller, Haines and Hoffman, p. 145:

It is important to apply the conversion at the final stage of rendering (when the values are written to the display buffer for the last time), and not before. If post-processing is applied after gamma correction, post-processing effects will be computed in nonlinear space, which is incorrect and will often cause visible artifacts. So operations such as tone mapping [...] can be applied to images to adjust luminance balance, but gamma corection should always be done last.

  • $\begingroup$ Alright, that makes sense. So post processing should usually be applied before gamma correction, so that the operations happen in linear space. Got it. $\endgroup$ – Daniel Kareh Aug 2 '17 at 1:52
  • $\begingroup$ @DanielKareh it depends on how you developed the tone map. If you developed it say in Photoshop from a screen capture then it will obviously go last $\endgroup$ – joojaa Aug 3 '17 at 19:00
  • $\begingroup$ @DanielKareh Note though that even in programs like Photoshop you can change the color space $\endgroup$ – Tare Aug 6 '17 at 8:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.