I've been trying adding HDR support to my system but I got a couple of questions. I believe what I'm doing before tone-mapping is fine:
- Setup a RGBA16F Render Target
- Render to that RT
- call the postprocessing tone mapping on the cited RT and display the result on screen.
Now to test this I've cranked up a bit my light intensity:
Now if I apply the following tone mapping function (either one, the result is similar)
col *= exposure; col = max(vec3(0.0), col -0.004); col = (col *(6.2*col + 0.5)) / (col *(6.2*col +1.7)+0.06); return vec4(col ,1.0)
col *= exposure; col = col / (1+col); return vec4(col, 1.0);
if the exposure is more than 0.5 for the above image and previous functions the result is pretty flat:
Where for an exposure value of about 0.4 the result is ok:
Although it's very darkish (unsurprisingly as the exposure is pretty low).
Now the same issue (flatness of the tone-mapped image) is there for a "normal" light intensity which is fine even without using HDR. To get a decent result I have to lower the exposure even for that case, resulting though, again, in a darkish image.
My questions are then two:
- Am I missing something important here? I feel that the result I get is somewhat wrong
- Is there a way to "automatically" select what's considered a good exposure value for a given scene?
Thank you very much