Ground fog and shaddows

Hi, I’m trying to implements ground fog with the shader node system. I seem to have the basics working, but I’m wondering if there’s anything I can do about shadows here?
I’m guessing they’re showing up so strongly because they’re a post processor effect. Does this mean they’re ignoring the fog obscuration? Is there any way to make the shaddow processor take this into account?


Hm i guess the fog could be made with a postprocessor as well, by using the depth to estimate the distance.
If that is done after the shadowprocessor it might work.

Yeah, I was originally using the FogPostProcessor, which was fine, except I don’t think there’s any way to limit the height of the fog, as we only have depth information in the post processor

Well, you have texture coordinates as well as depth. in combination with a inverse view projection matrix it would give you the world space coordinates…

Not saying there is a more clever solution. But you should have all you need

1 Like

Yeah, I think your options are either:

  1. use post-processor fog and deal with its ugly limitations.
  2. modify shadow processing to deal with fog.

…though if you are talking about the dark patches on the character near the camera then I don’t think that has anything to do with fog itself.

Thanks for your help guys, I went with creating a new post processor fog in the end and introduced the height limitation based on the reconstructed world coordinates as @zzuegg suggested (Didn’t know you could do that :blush: )


looking pretty good. Add some low frequency noise, maybe with a g_Time modifier, and you are good to go :monkey_face: