Fog Removal Shader

  • Lord Of Lunacy
  • Topic Author
More
3 years 11 months ago - 3 years 11 months 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: 3 years 11 months 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.

  • Martigen
More
3 years 11 months 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.

  • ZabaZu
More
3 years 11 months 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.

  • clayb
More
3 years 11 months 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.

  • supercento
More
3 years 10 months 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.

  • Uncle Crassius
More
3 years 10 months ago #6 by Uncle Crassius Replied by Uncle Crassius on topic Fog Removal Shader

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

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

  • klotim
More
3 years 10 months 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.

  • Tojkar
More
3 years 7 months ago - 3 years 7 months 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: 3 years 7 months ago by Tojkar.

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

  • PureEvilWindom
More
3 years 5 months 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.

  • Viper_Joe
More
3 years 5 months ago #10 by Viper_Joe Replied by Viper_Joe on topic Fog Removal Shader

PureEvilWindom wrote: oh no its gone. anyone still have this ?


github.com/LordOfLunacy/Insane-Shaders/b...haders/FogRemoval.fx
The following user(s) said Thank You: PureEvilWindom

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

  • ZabaZu
More
3 years 5 months 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.

  • Skinner
More
3 years 3 months 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.

  • Skinner
More
3 years 3 months 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.

  • Skinner
More
3 years 3 months 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.

  • canceralp
More
3 years 3 months 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.

We use cookies
We use cookies on our website. Some of them are essential for the operation of the forum. You can decide for yourself whether you want to allow cookies or not. Please note that if you reject them, you may not be able to use all the functionalities of the site.