Jump to content
  • Advertisement
Sign in to follow this  
Alundra

Post-Process HDR or LDR nowadays

This topic is 1041 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi,
Bloom and ToneMap were used as a first step to have the post-process in LDR for memory usage and performance.
Is it correct to do the post-process HDR completely nowadays and end by the tone map ?
If FXAA is used, I guess it has to be applied after tone map, is it correct ?
I guess MSAA is applied at the end as well in Temporal-MSAA case.
Thanks
Edited by Alundra

Share this post


Link to post
Share on other sites
Advertisement

Postprocessing and dynamic range are 2 separate entity. The postprocessing operation(s) could care less about the dynamic range of the input, however, the visual impact of using HDR/LDR input/output is dependent on what you are trying to achieve. There is really no correct way per se, just a matter of choice and available resource. Ex. you would not want to use a full HDR postprocessing chain on a mobile device since the bandwidth required for unencoded HDR values will result in higher power usage by the device. Don't know how AA would fit into the chain, but I suspect it may be needed throughout, not just at the end.

Share this post


Link to post
Share on other sites
Don't know how AA would fit into the chain, but I suspect it may be needed throughout, not just at the end.

FXAA doesn't works with HDR it's why I said at the end, I guess MSAA is the same. 

Edited by Alundra

Share this post


Link to post
Share on other sites

This really depends on the quality and post processes you want. Some color operations only work on 8-bit images, so you should do those after tone mapping for sure (FXAA, for example). Others, like bloom, DOF or motion blur look best before tone mapping because of the extra precision. But there's nothing preventing you from doing it after, if you need the performance... though bloom is a bit trickier to do in LDR without making it look awful...

 

I think the most common option in AAA games is to use optimized shaders and fast formats for sampling. For example, motion blur can be done using R11G11B10F format for all samples except the center one (in fact, if you use blending, you can skip the center fetch completely). This is what we did for Ryse (and in CryENGINE) - not sure about other engines though, but I'd expect they do similar optimizations.

 

If R11G11B10F isn't enough precision, then one trick that works is to pre-expose your image (i.e. pre-scaling it with your exposure value) but not tone mapping it. Instead, you output that to a 10-bit texture (R10G10B10A2 or something) and then feed that into your HDR post processes. This still looks quite good since you still have 0-1023 values and if used after exposure is arguably enough* - and you're still only using a 32-bit integer texture which should be better for bandwidth/sampling (IIRC using R11G11B10F for sampling is fine but writing to it is half rate compared to full rate for R10G10B10A2 if you're not alpha blending, but I could be wrong or that could be outdated info). Of course you can still use R11G11B10F, whatever works for you. smile.png

 

When you're done you can pipe that into your tone mapping shader as you would normally, composite it with bloom (which should also be scaled by exposure), etc.

 

*Many camera RAW formats are 10bits (or 12bits) - 10bits is also a common format for color correction software.

Edited by Styves

Share this post


Link to post
Share on other sites
For lens effects like bloom/glare/DOF/motion blur/etc. you really want to use linear HDR if you can. Doing MSAA after tone mapping is possibly, but expensive and rather difficult. It essentially requires you to do your post-processing at MSAA resolution, which is both tedious and costly. I'd recommend doing MSAA and/or temporal AA before your post-processing, since this will provide a more temporally stable input for your post-processing chain. This really helps reduce flickering from bloom and DOF.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!