Jump to content
  • Advertisement
Sign in to follow this  
Ashaman73

Tonemapping and fog

This topic is 2534 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

Well, I'm currently trying to improve my standard full screen fog.

I'm not sure how to handle fog best.Currently I apply fog in a post-processing step (deferred shader) by just mixing the fog color with the frame color depending on a density function and the screen depth. My question is, would it be better to apply the fog before or after tone mapping ?

I would say, that before tonemapping would be the correct way, but wouldn't a dark and fogged scene lead to an undesired bright fogged screen ?

Share this post


Link to post
Share on other sites
Advertisement
If your tone mapper causes darks to turn bright, then that is the expected result. Darkening down the scene afterwards with fog would not provide the result expected by the artists.
Additionally, if you are not already, be sure you are blending all of your colors in linear space for the correct amount of contrast and color range. It helps the dark areas a lot.


L. Spiro

Share this post


Link to post
Share on other sites
Yeah it should be applied pre-tone-mapping if going for something physically correct. What kind of scene are you adding fog to?

If you're just using a plain fog colour, then that's similar to rendering the atmosphere as lit by a constant ambient light source -- so yeah, if you've got a black scene, and add a brightly-lit atmosphere to it, the atmosphere's lighting contribution will be way too dominant.

The first thing I'd try is making your fog colour similar to your average lighting (or ambient lighting) colour. If you're adding fog to a black cave, the fog colour should be black.

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!