I am currently implementing HDR rendering into our game. I got a basic version working, but I have a few questions on "how to do it right".
Exposure control and tonemapping are, even though you can do them in the same shader, two "completely" different steps in the pipeline, right? I mean the exposure control does not depend on which tonemapping operator I use?
I am wondering what's the best way to properly adapt the exposure. I've read that I should calculate the geometric mean of the luminance instead of the simple arithmetic mean. At the moment I do the exposure adjustment in a very basic way (found in the ogre engine hdr sample app):
texColor *= MIDDLE_GREY / lum;
Where texColor is obviously the scene. MIDDLE_GREY has a value of 0.72 and lum is the geometric mean of the luminances of all pixels.
Is this the standard way to adjust the exposure or is there a better algorithm to do this?
I first had the same algorithm just using a arithmetic mean. It seams that now with the geometric mean the exposure adjustment has a much smaller effect. It pretty much does only dial down very bright scenes and doesn't seam to lighten dark scenes very much. Am I doing something wrong or is this just the normal effect of using a geometric mean?
Is there some good literature on this topic? I can't find too much online ressources on hdr, exposure and tonemapping.
I hope someone can help ;)
videlMember Since 15 Aug 2012
Offline Last Active Apr 19 2016 03:28 AM