Fog Removal Shader

More
1 year 1 month ago - 1 year 1 month ago #1 by Lord Of Lunacy
Fog Removal Shader was created 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
Last edit: 1 year 1 month ago by Lord Of Lunacy.
The following user(s) said Thank You: jmx777, Tojkar, Viper_Joe, aaronth07, Shodan, YF

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

More
1 year 1 month ago #2 by Martigen
Replied by Martigen on topic Fog Removal Shader
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.

More
1 year 1 month ago #3 by ZabaZu
Replied by ZabaZu on topic Fog Removal Shader
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.

More
1 year 1 month ago #4 by clayb
Replied by clayb on topic Fog Removal Shader
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.

More
1 year 4 weeks ago #5 by supercento
Replied by supercento on topic Fog Removal Shader
It doesn't work for me. Compilation error. I don't use RT
The following user(s) said Thank You: hunt1hunt

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

More
1 year 4 weeks ago #6 by Uncle Crassius
Replied by Uncle Crassius on topic Fog Removal Shader

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?
The following user(s) said Thank You: hunt1hunt

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

More
1 year 4 weeks ago #7 by klotim
Replied by klotim on topic Fog Removal Shader
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.

More
9 months 3 weeks ago - 9 months 3 weeks ago #8 by Tojkar
Replied by Tojkar on topic Fog Removal Shader
For some reason this shader appears to be completely broken in Control using dx12. It works in some areas but not in others. Also the options menu turns completely black if this shader is enabled.

Not sure if this is isolated to this game or if it's caused by dx12.

EDIT: After testing with dx11 the problem seems to presist in that too.

I have no idea what could cause the menu to blackout, but in-game the problem seems to came at least partly from strong saturation. When in waste burner where the burner glown in very strong yellow and red, the shader has no effect and everything around the burner casts as strong AO as anything else. Confirmed this by desaturating the picture first before applying remove fog and AO and then the shader had clear effect.
Last edit: 9 months 3 weeks ago by Tojkar.

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

More
7 months 3 weeks ago #9 by PureEvilWindom
Replied by PureEvilWindom on topic Fog Removal Shader
oh no its gone. anyone still have this ?

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

More
7 months 3 weeks ago #10 by Viper_Joe
Replied by Viper_Joe on topic Fog Removal Shader
The following user(s) said Thank You: PureEvilWindom

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

More
7 months 3 weeks ago #11 by ZabaZu
Replied by ZabaZu on topic Fog Removal Shader
Since Lord of Lunacy isn't terribly active on here (as in he's never on here and only made this thread because I encouraged him too lol), the newest version of Fog Removal is Reveil. It's better in basically every way, but it's fundamentally different in how it works, which is why the old one was deprecated and kept in oldshaders instead of being removed.

So yeah, anybody interested in this shader should get reveil instead. github.com/LordOfLunacy/Insane-Shaders/

Also, his shader repository is included in the 4.8 installer now.
The following user(s) said Thank You: klotim, Viper_Joe, Dazaster, PureEvilWindom, YF

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

More
5 months 2 weeks ago #12 by Skinner
Replied by Skinner on topic Fog Removal Shader
I can't get it to work, Reveil.fx, its does nothing or, sometimes a warning in the form yellow tekst, X4000, potential unititialized variables (airlight and fog)

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

More
5 months 2 weeks ago #13 by Skinner
Replied by Skinner on topic Fog Removal Shader
Do people get this working? I tried, Shadow of the Tombraider (dx12), Desolate and Skyrim (also SE). Please respond?

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

More
5 months 2 weeks ago #14 by Skinner
Replied by Skinner on topic Fog Removal Shader
Why doesn't a single soul respond.....:(

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

More
5 months 1 week ago #15 by canceralp
Replied by canceralp on topic Fog Removal Shader
It does work, however, there is a new shader of him. It is called Reveil. Very much more performance friendly with better accuracy. Lord of Lunacy is not active here in the forum but updates the Github page and the shaders frequently.

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