High Pass Sharpening / Contrast Enhancement
- Ioxa
- Topic Author
The Clarity shader is pretty simple though, I don't think there is much more I need to do to it. There are just a few more things I can think of that I'd like to change and maybe after that I'll see if they would want to add it to the Framework.
Please Log in or Create an account to join the conversation.
- DeMondo
Please Log in or Create an account to join the conversation.
- Ioxa
- Topic Author
Download ioFX v1.2 for ReShade + Framework
In this version I added a Bilateral filter and made a few more changes to the Clarity and High Pass Sharpening shaders.
The Bilateral filter can be used to blur without blurring across edges, this is similar to surface blurring. I'm also experimenting with using it for sharpening. The advantage of using a bilateral filter to sharpen is that it won't create halos around the edges of objects. On top of this I've also added a selective sharpening setting to limit the sharpening to highly textured areas, the idea behind this is to eliminate unwanted noise that may show up in areas such as sky textures that don't need to be sharpened.
For the Clarity and High Pass Sharpening shaders I added a setting for MaskContrast. Setting this to 0.00 uses linear interpolation to create the mask, this is what I've been using up till now. Setting it to 1.00 uses the Vivid Light blend mode to create the mask. Everything between 0.00 and 1.00 is a blend between the two.
I also removed the ClarityRadius setting and changed the way ClarityOffset works. As the offset gets larger the shader will increase the number of passes used, this seems to have a much lower performance cost than doing a single pass with a lot of texture fetches.
I still have a lot of ideas and things I want to work on but I'm not that motivated to work on it right now so I'm uploading what I've got. Let me know if you think any of the changes are bad or if I've broken anything and I'll try to make adjustments and improvements.
Please Log in or Create an account to join the conversation.
- GlobalShader
Ioxa wrote: Updated ioFX to version 1.2
Download ioFX v1.2 for ReShade + Framework
In this version I added a Bilateral filter and made a few more changes to the Clarity and High Pass Sharpening shaders.
The Bilateral filter can be used to blur without blurring across edges, this is similar to surface blurring. I'm also experimenting with using it for sharpening. The advantage of using a bilateral filter to sharpen is that it won't create halos around the edges of objects. On top of this I've also added a selective sharpening setting to limit the sharpening to highly textured areas, the idea behind this is to eliminate unwanted noise that may show up in areas such as sky textures that don't need to be sharpened.
For the Clarity and High Pass Sharpening shaders I added a setting for MaskContrast. Setting this to 0.00 uses linear interpolation to create the mask, this is what I've been using up till now. Setting it to 1.00 uses the Vivid Light blend mode to create the mask. Everything between 0.00 and 1.00 is a blend between the two.
I also removed the ClarityRadius setting and changed the way ClarityOffset works. As the offset gets larger the shader will increase the number of passes used, this seems to have a much lower performance cost than doing a single pass with a lot of texture fetches.
I still have a lot of ideas and things I want to work on but I'm not that motivated to work on it right now so I'm uploading what I've got. Let me know if you think any of the changes are bad or if I've broken anything and I'll try to make adjustments and improvements.
Could these shaders be merged to reshade repository?
Please Log in or Create an account to join the conversation.
- Genrix
You forgot a line #include EFFECT(ioFX, Util) in readme
Please Log in or Create an account to join the conversation.
- padolamap
On the other hand all this part seems not to work, maybe this doing something wrong
#define CurveRed 0.00 //[-0.50:0.50] //-
#define CurveBlue 0.00 //[-0.50:0.50] //-
#define CurveGreen 0.00 //[-0.50:0.50] //-
Thanks
Please Log in or Create an account to join the conversation.
- Ioxa
- Topic Author
Thanks, I'll have to fix that.Genrix wrote: Ioxa,
You forgot a line #include EFFECT(ioFX, Util) in readme
It could be caused by something in the blur passes, that's the only thing I can think of that would create that pattern. I haven't noticed anything like that though, so if you could post a screen shot and your settings I might be able to figure out what is causing it.padolamap wrote: I'm having some flashes across the screen especially when used BilateralFilter are as asterisks or as the number sign, like a rain.
On the other hand all this part seems not to work, maybe this doing something wrong
#define CurveRed 0.00 //[-0.50:0.50] //-
#define CurveBlue 0.00 //[-0.50:0.50] //-
#define CurveGreen 0.00 //[-0.50:0.50] //-
Thanks
I forgot about those curve settings... I didn't update the color filter shader, they won't do anything.
Please Log in or Create an account to join the conversation.
- padolamap
they are like crosses and asterisks and are on the whole panatalla
////
//
///**HighPassSharpening**///
//
////
#define USE_HighPassSharpening 1 //[Sharp] //-Sharpens the image.
from already very grateful for your attention
//>Sharpening Settings<\\
#define SharpPrecision 4.0 //[0.4:5.0] //-#'s > 1 = smaller radius, #'s < 1 = bigger radius. A small radius will sharpen small details, a large radius will sharpen large details.
#define SharpRadius 2 //[0:2] //-0 = 3x3 mask, 1 = 5x5 mask, 2 = 7x7 mask.
#define MaskContrast 0.85 //[0.00:1.00] //-Increases the contrast in the SharpMask.
#define BlendMode 3 //[1|2|3|4|5|6|7] //-1 = Soft Light(weak), 2 = Overlay(neutral), 3 = Multiply, 4 = Hard Light, 5 = Vivid Light, 6 = Screen(strong) 7 = Linear Light
#define HPSharpStrength 1.50 //[-0.50:2.00] //-Strength of the sharpening effect. Negative values soften the image.
//>Advanced Sharpening Settings<\\
#define DarkLineIntensity 4.0 //[0.0:5.0] //-Adjust the strength of dark halos. If the dark halos are clamped, higher values may increase the radius but not the darkness.
#define LightLineIntensity 4.0 //[0.0:5.0] //-Adjust the strength of light halos. If the light halos are clamped, higher values may increase the radius but not the brightness.
#define DarkLineClamp 0.50 //[0.00:0.50] //-
#define LightLineClamp 0.50 //[0.00:0.50] //-
#define ViewSharpMask 0 //[0|1] //-Set to 1 to view the SharpMask. Helpful when adjusting settings.
#define HighPass_ToggleKey VK_INSERT //[undef] //-Default is the "Insert" key. Change to RFX_ToggleKey to toggle with the rest of the Framework shaders.
////
//
///**Clarity**///
//
////
#define USE_Clarity 1 //[Clarity] //-A local contrast enhancement technique that will emphasize objects in high contrast areas.
//>Clarity Settings<\\
#define ClarityOffset 15 //[1:20] //-Values less than 1 will decrease the radius, values greater than 1 will increase the radius.
#define ClarityMaskContrast 0.5 //[0.00:1.00] //-Increases the contrast in the ClarityMask.
#define ClarityBlendMode 3 //[1:7] //-1 = Soft Light(weak), 2 = Overlay(neutral), 3 = Multiply, 4 = Hard Light, 5 = Vivid Light, 6 = Soft Light#2(lighter), 7 = Soft Light#3(darker)
#define ClarityStrength 0.50 //[-0.50:2.00] //-Strength of the effect.
//>Advanced Clarity Settings<\\
#define DarkIntensity 5.0 //[0.0:5.0] //-Adjust the strength of dark halos.
#define LightIntensity 0.0 //[0.0:5.0] //-Adjust the strength of light halos.
#define DarkClamp 0.00 //[0.0:0.50] //-Adjust the strength of dark halos.
#define LightClamp 0.00 //[0.0:0.50] //-Adjust the strength of light halos.
#define ViewMask 0 //[0:1] //-The mask is what creates the effect. View it when making adjustments to get a better idea of how your changes will affect the image.
#define BlendIfDark 0 //[0:255] //-Any pixels below this value will be excluded from the effect. Set to 50 to target mid-tones.
#define BlendIfLight 255 //[0:255] //-Any pixels above this value will be excluded from the effect. Set to 205 to target mid-tones.
#define ViewBlendIfMask 0 //[0:1] //-Areas covered in RED receive contrast enhancement, areas covered in BLUE do not. The stronger the color, the stronger the effect.
//>Performance and Misc Settings<\\
#define ClarityTextureFormat 1 //[0|1|2] //-0 = R8, 1 = R16F, 2 = R32F.
#define ClarityTexScale 0 //[0|1|2] //-0 = no scaling, 1 = 1/2 resolution, 2 = 1/4 resolution. Reduces performance cost.
#define Clarity_ToggleKey VK_INSERT //[undef] //-Default is the "Insert" key. Change to RFX_ToggleKey to toggle with the rest of the Framework shaders.
////
//
///**BilateralFilter**///
//
////
#define USE_BilateralFilter 1 //[BilateralFilter] //-An edge-preserving smoothing filter. Can be used to reduce noise or sharpen without creating halos around strong edges.
//>Bilateral Settings<\\
#define SigmaEdge 0.90 //[0.01:1.00] //-The strength of the edges being preserved by the filter. Small values will preserve finer details.
#define BlurWidth 1 //[1:3] //-Higher values increase the blur radius but also increases the performance cost.
#define Iterations 1 //[1:3] //-Determines the number of blur passes the image goes through.
#define BilateralStrength 1.00 //[0.00:1.00] //-Overall strength of the effect.
#define BilateralFilterr_ToggleKey VK_INSERT //[undef] //-Default is the "Insert" key. Change to RFX_ToggleKey to toggle with the rest of the Framework shaders.
//>Detail Settings<\\
#define DetailStrength 1.90 //[0.00:2.00] //-Multiplier for the detail channel. 0.00 = No detail.
#define DetailCurveType 3 //[0:3] //-Curving the detail channel makes the image sharper, a stronger curve = a sharper image. 0 = no curve, 1 = smoothstep, 2 = smootherstep, 3 = smoothererstep.
#define Use_SelectiveSharpening 1 //[0:1] //-Applies sharpening to highly textured areas only. Increases the performance cost. Set to 0 if using the filter for blurring (DetailStrength = 0.00).
#define LowDetailCutoff 0.0001 //[0.00:0.25] //-Everything below this point is considered low detail and will not be sharpened.
#define HighDetailCutoff 0.90 //[0.05:1.00] //-Everything above this point is considered high detail and will be sharpened.
#define TextureMaskStrength 10.0 //[0.5:10.0] //-Adjusts the strength of textured areas.
#define ViewTextureMask 0 //[0:1] //-Texture mask used for SelectiveSharpening. Black areas are considered LowDetail, white areas are considered HighDetail. Helpful when adjusting DetailCutoffs and TextureMaskStrength.
Please Log in or Create an account to join the conversation.
- piltrafus
padolamap wrote: they are like crosses and asterisks and are on the whole panatalla
It seems like you finally burned yor GPU memory. Congrats. You are a man now
Jokes aside if it looks similar to the pics in the link below your card may be gone. It may only happen in certain situations because the rest of the time you are not using the damaged area of the memory.
www.techsupportforum.com/forums/f24/vide...symptoms-651405.html
Please Log in or Create an account to join the conversation.
- padolamap
thanks
Please Log in or Create an account to join the conversation.
- Ioxa
- Topic Author
Please Log in or Create an account to join the conversation.
- padolamap
Please Log in or Create an account to join the conversation.
- Ioxa
- Topic Author
Glad that worked. Thanks for letting me know. Did it seem like it was mostly the bilateral filter causing it?padolamap wrote: thank you very much, you can fix by changing these values, thank you very much for your great work
Please Log in or Create an account to join the conversation.
- Echo
Have been following Reshade and your awesome ioFX almost from the start, but didn't have any questions or the necessity to ask anything, till the arrival of the New Reshade 2.0 and the absence of your ioFX in it, I had to ask if you're working on an update for Reshade 2.0?
I really hope you do, cause I can't use Reshade 2.0 without your awesome ioFX, (still using Reshade 1.1 and eagerly waiting for your update)
Thanks in advance!
Please Log in or Create an account to join the conversation.
- Ioxa
- Topic Author
Yup, I'm working on porting the shaders to 2.0. I ran into a couple issues but I think I've got them solved, just waiting on clarification on something. Hopefully it won't be more than a day or two.Echo wrote: Hey loxa,
Have been following Reshade and your awesome ioFX almost from the start, but didn't have any questions or the necessity to ask anything, till the arrival of the New Reshade 2.0 and the absence of your ioFX in it, I had to ask if you're working on an update for Reshade 2.0?
I really hope you do, cause I can't use Reshade 2.0 without your awesome ioFX, (still using Reshade 1.1 and eagerly waiting for your update)
Thanks in advance!
Please Log in or Create an account to join the conversation.
- Echo
Thank you again in advance!
Please Log in or Create an account to join the conversation.
- Ioxa
- Topic Author
Download Shaders by Ioxa for ReShade 2.0
I made some small changes to some of the shaders but nothing major. The Clarity shader probably got the biggest change, I once again changed the options for adjusting the width of the effect. I think the way it is set up now gives the most customization for quality and performance. But I'm open to any ideas that may improve it.
I also uploaded a version of the shaders with an updated Gaussian shader. I'm not entirely sure I will keep it the way it is so consider this a test.
Download Shaders by Ioxa for ReShade 2.0 With Gauss
I changed the way the weights and offsets for the blur passes are calculated, this allows for a lot more flexibility when adjusting the blur width.
I added an option called SurfaceBlur which will help reduce halos that may appear around objects. This process used for doing this does not work very well in a separable filter so it causes some artifacts. As long as the blur strength isn't set too high they shouldn't be very noticeable.
I changed the "warm" option is GaussBloomWarmth. I'll never get it to look the way it did in SweetFX so I tried something a little different, I gave it a bit of a yellowish tint with a reddish tint around the edge. I don't know if I'll keep it this way or not, just something I wanted to try out.
I forgot to add a readme to the files but the install should be pretty straight forward. Merge the ReShade folder with your existing ReShade folder and overwrite the files when prompted. This will overwrite Pipeline.cfg, Shaders_by_Ioxa.cfg, Ioxa.undef, and Gaussian.fx if you've downloaded the files with Gauss.
If you have any questions, problems, or suggestions let me know!
Please Log in or Create an account to join the conversation.
- crosire
Please Log in or Create an account to join the conversation.
- padolamap
Please Log in or Create an account to join the conversation.
- Ioxa
- Topic Author
Ok, I'll add them. I want to clean them up a little first and see if anyone has any issues with the ones I posted here.crosire wrote: I suggest you add those to github.com/crosire/reshade-shaders
I think I fixed the cause of the problem you were running into with the bilateral filter. Try the shaders with the settings you were using before and let me know if it's still happening.padolamap wrote: many but thank you very much to you and extend to all other
Please Log in or Create an account to join the conversation.