Fog Removal Shader

  • Posts: 1
2 months 2 weeks ago - 2 months 2 weeks ago #1 by Lord Of Lunacy
This is my attempt at making a shader that is capable of removing fog (and volumetric lighting) from an image so that effects such as RTGI can be applied without their interference, and then be able to add the fog back in.

Before Removal:


After Removal (w/o Restoration):



RTGI:


RTGI w/ Fog Removal:



The shader can be found on my Github at:
github.com/LordOfLunacy/reshade-shaders/...master/FogRemoval.fx
The following user(s) said Thank You: jmx777, Tojkar, Viper_Joe, aaronth07, Shodan

Please Log in or Create an account to join the conversation.

  • Posts: 455
2 months 2 weeks ago #2 by Martigen
This is amazing! What magic is this?!

I've always thought this is one thing we'll never be able to fix, as AO is using the depth buffer and it's unavoidable, but what a novel solution!

Will definitely check this out later :)

I wonder also if it's possible for Marty to integrate your work, if given permission, into MXAO/RTGI so that it can all be done in the passes performed there?

Please Log in or Create an account to join the conversation.

  • Posts: 18
2 months 2 weeks ago #3 by ZabaZu
It's essentially an intelligent contrast shader. It's not a perfect solution, but if your goal is to play a game with mxao/rtgi, the negatives are very much worth it (the negatives being it altering the way rtgi/mxao behave, depending on configuration).

Please Log in or Create an account to join the conversation.

  • Posts: 6
2 months 2 weeks ago #4 by clayb
Wow! (that mountain was completely obscured but there it is, mind blown already).
Isn't isolating fog like a holy grail of Reshade and similar wrappers? Haven't tried it yet, but looks really promising!

Please Log in or Create an account to join the conversation.

  • Posts: 10
2 months 1 week ago #5 by supercento
It doesn't work for me. Compilation error. I don't use RT

Please Log in or Create an account to join the conversation.

  • Posts: 228
2 months 1 week ago #6 by Uncle Crassius

supercento wrote: It doesn't work for me. Compilation error. I don't use RT


Which Reshade version are you using? If not the latest, try the latest. Other than that, does the error message say anything in red about the reason?

Please Log in or Create an account to join the conversation.

  • Posts: 181
2 months 1 week ago #7 by klotim
The shader reduced my fps from 42 to 36fps. That's quite a hit considering RTGI also takes 6fps.
Using a 2080Ti on metro exodus maxed out 1440p.

Please Log in or Create an account to join the conversation.