Experimentation with vertical fog
This experiment is actually a couple of months old at this point but has been put to the side for a little bit to make a better implementation.
It doesn't look half bad, but there are some limitations. For starters, this is not volumetric. It is a post-processing effect utilizing the depth buffer converted into a world-space texture. It basically draws anything below the height of the fog (in this example, using the water level) with a falloff.
This means it needs actual geometry to determine where the fog lands.
So looking up through fog looks something like this:
We also have a bit of a render order issue, but that should be easy enough to solve.
Looking up through the fog does introduce some potential issues, however. Now I didn't expect this solution to work nearly as well as it does (visually). So I might be surprised with this next step as well. We could make a post-processing effect similar to how we do the water, where the effect would "thicken" on the camera the further into the fog it goes. Another way would be to add a plane when looking up. Which would basically handle things similarly, but rather than being a post-processing effect, it would live in the "world," making render order a bit easier.
I fear both of these solutions would come across a little bit flat. Although I didn't think doing this rather naive version of vertical fog would be this successful either, so at this point, it's worth trying to see it in action.
I do believe there is value in this fog, even in its current form. There is a bit of rewrite needing to happen on how the game handles the water plane. This is partially to allow for different plane types such as lava etc. but will also make it a bit easier to set up the Vertical fog UI. It makes the most sense for it to live next to the water slider, assuming we can make it behave with the water.
I choose to talk about vertical fog today because it has seen some experimental testing out in the wild, which will come up later in the week. So stay tuned for that.
Till next time!