New effect: Depth haze
- OtisInf
- Topic Author
You can see this effect here: (Check the tower in the distance).
abload.de/image.php?img=witcher32015-11-1718-lapih.png
However, in freecam this is disabled:
abload.de/image.php?img=witcher32015-11-1718-b1ol3.png
Which is of course annoying if you want to make proper screenshots. So I created this effect for reshade. It's called depth haze and it makes the above picture look cool again:
abload.de/image.php?img=witcher32015-11-1718-tqpus.png
It works by blending a blurred version of the screenbuffer onto the screenbuffer based on depth. It prevents edge bleed to avoid shimmering due to the blur when sharp edges are present.
Code: github.com/FransBouma/OtisFX
I'll try to create a PR for reshade on github to add my effects. I'll clean up my config file a bit so everything is properly commented and has range values for mediator.
Hope it's useful!
(the blurring and edge bleed threshold is configurable. Of course if I made a glorious error somewhere, please let me know!)
Please Log in or Create an account to join the conversation.
- SirArthurStreebGreebling
I'm getting an undeclared identifier "RFX_pixelsize" error in the depthhaze.h file. Not sure whats causing that but this isn't the first time I've had it using third party shaders, am i doing something wrong?
Nevermind, fixed it. The line was taken out of the reshadefx file in 1.1 i think. You just need to paste this line into reshade.fx
#define RFX_pixelSize RFX_PixelSize
Please Log in or Create an account to join the conversation.
- Constantine PC
This will tremendously help games like GTA V where the distant objects aren't too pretty.
Please Log in or Create an account to join the conversation.
- Wicked Sick
Please Log in or Create an account to join the conversation.
- OtisInf
- Topic Author
SirArthurStreebGreebling wrote: I was just thinking about how it would be nice if this was added to reshade earlier..thanks.
I'm getting an undeclared identifier "RFX_pixelsize" error in the depthhaze.h file. Not sure whats causing that but this isn't the first time I've had it using third party shaders, am i doing something wrong?
Nevermind, fixed it. The line was taken out of the reshadefx file in 1.1 i think. You just need to paste this line into reshade.fx
#define RFX_pixelSize RFX_PixelSize
Thanks for that! Indeed I used 1.0. I've corrected depthhaze.h on github, so the version there now has the right casing and should work with 1.1! (so the line you copy/pasted in can be removed)
Please Log in or Create an account to join the conversation.
- Sh1nRa358
Please Log in or Create an account to join the conversation.
- OtisInf
- Topic Author
Please Log in or Create an account to join the conversation.
- Sh1nRa358
Please Log in or Create an account to join the conversation.
- OtisInf
- Topic Author
Please Log in or Create an account to join the conversation.
- Sh1nRa358
Btw, there's a yellow line of text onscreen when enabling Emphasize. It says: State of Decay [Year-One Survival Edition]\Shader@0x18448718(178,28): warning X3206: '__tex2D': implicit truncation of vector type
Can you allow for the blur to be stronger and can you allow to bring the blur closer to the center (character)?
Please Log in or Create an account to join the conversation.
- OtisInf
- Topic Author
the blur can be stronger, just increase the DEH_EffectStrength value in otisfx.cfg. 1.0 is the max, and will make a lot very blurry.
I think increasing the value will already answer your second question as well (as it works on the depth buffer, which starts immediately at the character.
Please Log in or Create an account to join the conversation.
- Alastre
I'm new here and totally newbie about this software...hope this is the right thread to join! Fact is, I've found this "mod" (actualy a reshade preset) on nexus for Witcher 3:
www.nexusmods.com/witcher3/mods/152/ ?
I've spent a few days trying to make it works than I realized it only works with old reshade version. I Think it's an Amazing preset (except too dark and warm\satured...plus kill GPU and I'm playing 4K native with 980ti SLI). Due to the fact it's impossible to contact the autor, I'd like to know if possibile what kind of effect he used to give the game this kind of effect...everything looks more detailed and like being Whole part of the world, like being in a bubble...everything looks rounded...is that bloom, depth of field or what? Could it be this depth haze? Really don't know how to explain...but look here the difference:
i.imgur.com/4y8jDND.jpg
i.imgur.com/OImoBod.jpg
I was wondering if anybody here was able to edit this preset to make it less dark and with colder colors...and lighter for gpu...or at least explain me how to add this particolar effect to the preset i'm using now...thank you very much in advance!
Please Log in or Create an account to join the conversation.
- Alastre
Or look at this screens, they really looks cinematic:
staticdelivery.nexusmods.com/mods/952/im...152-2-1444789910.jpg
staticdelivery.nexusmods.com/mods/952/im...152-3-1444789909.jpg
staticdelivery.nexusmods.com/mods/952/im...152-3-1442453374.jpg
staticdelivery.nexusmods.com/mods/952/im...152-1-1442543141.jpg
Please Log in or Create an account to join the conversation.
- JPulowski
I have a question though: is there a negative or positive correlation between DEH_EffectStrength and DEH_EdgeBleedThreshold?
Please Log in or Create an account to join the conversation.
- OtisInf
- Topic Author
the threshold simply doesn't allow a neighbor pixel to be taken into account for the blur if the contrast is over the bleed threshold (so a sharp edge of a branch in front of a sky doesn't bleed into the pixels of the sky and vice versa). effect strength therefore doesn't affect it.
This didn't feel right with me, it felt like a hack. So I rewrote the effect: I now use weighted blurring: weight of a pixel is based on distance to the pixel to blur (in screenspace), its depth difference and its actual depth. This automatically prevents edge bleed entirely. In the latest version I therefore removed the edgebleed setting. Now looks like this:
(this is fairly strong effect strength (0.6). Smooth progress of the slight blur, no edge bleed of sharp edges of treebranches etc.)
I've created a Pull request to get it merged into the reshade framework.
(edit) now merged with reshade shader framework: github.com/crosire/reshade-shaders .
Please Log in or Create an account to join the conversation.
- Mobeeuz
It's slightly broken, you forgot to add //??? Settings<\\ markers in the OtisFX.cfg. Mediator has no settings to display.OtisInf wrote: (edit) now merged with reshade shader framework
Please Log in or Create an account to join the conversation.
- OtisInf
- Topic Author
Please Log in or Create an account to join the conversation.
- Mobeeuz
There are no settings to manipulate via mediator. Case and point, with the vanilla cfg:OtisInf wrote: Not sure what you mean, as they're there?
////-------------------//
/// **GOLDEN RATIO** ///
//-------------------////
#define USE_GOLDENRATIO 0 //[GoldenRatio] //-Golden Ratio : This simple effect renders 4 golden ratio spirals (fibonacci) on the screen to make it easier to take perfect screenshots by making it easier to perfect the composition. Requires the game to have an active depth buffer.
#define GOR_Opacity 0.3 //[0.00:1.00] //-Opacity of overlay. 0 is invisible, 1 is opaque lines.
#define GOR_ResizeMode 1 //[0:1] //-Resize mode: 0 is clamp to screen (so resizing of overlay, no golden ratio by definition), 1: resize to either full with or full height while keeping aspect ratio: golden ratio by definition in lined area.
#define GOR_ToggleKey RFX_ToggleKey //[undef] //-Key to toggle the overlay on or off.
Now if you change the code to the following:
////-------------------//
/// **GOLDEN RATIO** ///
//-------------------////
#define USE_GOLDENRATIO 0 //[GoldenRatio] //-Golden Ratio : This simple effect renders 4 golden ratio spirals (fibonacci) on the screen to make it easier to take perfect screenshots by making it easier to perfect the composition. Requires the game to have an active depth buffer.
//>Golden Ratio Settings<\\
#define GOR_Opacity 0.3 //[0.00:1.00] //-Opacity of overlay. 0 is invisible, 1 is opaque lines.
#define GOR_ResizeMode 1 //[0:1] //-Resize mode: 0 is clamp to screen (so resizing of overlay, no golden ratio by definition), 1: resize to either full with or full height while keeping aspect ratio: golden ratio by definition in lined area.
#define GOR_ToggleKey RFX_ToggleKey //[undef] //-Key to toggle the overlay on or off.
Obviously, that screenshot includes //>Depth Haze Settings<\\ and //>Emphasize Settings<\\ settings as well.
Please Log in or Create an account to join the conversation.
- Ganossa
I quickly added the category names in Otis, hope you do not mind
Please Log in or Create an account to join the conversation.
- OtisInf
- Topic Author
Please Log in or Create an account to join the conversation.