High Pass Sharpening / Contrast Enhancement

More
5 years 3 months ago #101 by crosire
Replied by crosire on topic High Pass Sharpening / Contrast Enhancement

paxton676 wrote: Shaders fail to compile with Reshade Framework 1.1. ioFX needs update.

What's the error?

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

More
5 years 3 months ago #102 by Ioxa

paxton676 wrote: Shaders fail to compile with Reshade Framework 1.1. ioFX needs update.

Looks like it's related to RFX_pixelSize, it needs to be changed to RFX_PixelSize.
If you use Notepad++ you can open the shader files and fix it pretty quick using replace.
I'll try to update it in the next few days though.

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

More
5 years 3 months ago #103 by Ganossa
Replied by Ganossa on topic High Pass Sharpening / Contrast Enhancement
Sorry Ioxa, there was an entry before in the ReShade.fx file:
#define RFX_pixelSize RFX_PixelSize

I deleted it after I took it out from Marty's shader files I believe. I was not aware it is also used in other files (hope there are not more). :blush:

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

More
5 years 3 months ago #104 by crosire
Replied by crosire on topic High Pass Sharpening / Contrast Enhancement

LuciferHawk wrote: I deleted it after I took it out from Marty's shader files I believe.

That was me =), replaced all references in shaders that were in the framework already, but did not think about external ones.

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

More
5 years 3 months ago #105 by Ioxa
Ha, I was wondering why that would suddenly be different. I've been meaning to update this anyway so this is a good push to get me started on it.
The following user(s) said Thank You: Wicked Sick

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

More
5 years 3 months ago #106 by Ioxa
Download ioFX v1.1 for ReShade + Framework

Updated for compatibility with changes made in the recent Framework update. Install instructions are included in the download or they can be found in the OP.

High Pass Sharpening
- Made some changes to the DarkLineIntesity and LightLineIntensity settings. They are much stronger now and will bring out a lot more detail.

Clarity
- Reduced the shader to two passes. Previously I think it was a minimum of five passes and could go as high as 11 depending on the radius settings. This reduces the performance cost quite a bit.
- Reworked the DarkIntensity and LightIntensity settings. They are much stronger now and bring out more detail.
- Added a temporary setting called LightnessTest. I've been experimenting with different ways to calculate the luminosity for the effect but haven't settled on anything yet so I left this setting in for now. The different options will bring out different details in the image and can change the look quite a bit.

Chromatic Aberration
- Made some changes to improve performance.
- Made some small changes to a few of the settings, no major changes.

Color Filter
- Made some changes to the filter color adjustments to better isolate the bright, mid, and dark regions.

As always, any feedback to help improve these shaders is welcomed. Especially with the LightnessTest in the Clarity shader, any input to help narrow that down is appreciated.
The following user(s) said Thank You: SpinelessJelly, Ganossa, NotAgOat, Scorpio82CO, DeMondo, PasserBy

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

More
5 years 3 months ago #107 by NotAgOat
Replied by NotAgOat on topic High Pass Sharpening / Contrast Enhancement
Thanks for the update Ioxa, iofx is a necessity for me.
The following user(s) said Thank You: Ioxa

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

More
5 years 2 months ago #108 by PasserBy
Replied by PasserBy on topic High Pass Sharpening / Contrast Enhancement
I liked a lot ioFX and most of all I liked Clarity shader. I've seen your Gaussian on github, will this ones be added to Framework too?

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

More
5 years 2 months ago #109 by Ioxa
I'm still very new to coding so I feel more comfortable keeping this stuff separate in case I have to make some major changes. The gaussian shader is a port of Boulotaur2024's shader so most of the work for that was already done.

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.
The following user(s) said Thank You: Tycholarfero, Encryption

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

More
5 years 1 month ago #110 by DeMondo
Replied by DeMondo on topic High Pass Sharpening / Contrast Enhancement
ioFX v1.1 for ReShade + Framework is a great addition, thank you Ioxa!
The following user(s) said Thank You: Ioxa

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

More
5 years 1 month ago #111 by Ioxa
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.
The following user(s) said Thank You: Wicked Sick, SiriusHours, Alex_outer, padolamap, SpinelessJelly, sajittarius, DeMondo, Golgotha, piltrafus, Rone and 3 other people also said thanks.

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

More
5 years 1 month ago - 5 years 1 month ago #112 by GlobalShader
Replied by GlobalShader on topic High Pass Sharpening / Contrast Enhancement

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?
Last edit: 5 years 1 month ago by GlobalShader.

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

More
5 years 1 month ago #113 by Genrix
Replied by Genrix on topic High Pass Sharpening / Contrast Enhancement
Ioxa,
You forgot a line #include EFFECT(ioFX, Util) in readme :)
The following user(s) said Thank You: Ioxa

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

More
5 years 2 weeks ago #114 by padolamap
Replied by padolamap on topic High Pass Sharpening / Contrast Enhancement
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

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

More
5 years 2 weeks ago #115 by Ioxa

Genrix wrote: Ioxa,
You forgot a line #include EFFECT(ioFX, Util) in readme :)

Thanks, I'll have to fix that.

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

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.

I forgot about those curve settings... I didn't update the color filter shader, they won't do anything.
The following user(s) said Thank You: padolamap

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

More
5 years 2 weeks ago #116 by padolamap
Replied by padolamap on topic High Pass Sharpening / Contrast Enhancement

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.

More
5 years 1 week ago - 5 years 1 week ago #117 by piltrafus
Replied by piltrafus on topic High Pass Sharpening / Contrast Enhancement

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
Last edit: 5 years 1 week ago by piltrafus.

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

More
5 years 1 week ago #118 by padolamap
Replied by padolamap on topic High Pass Sharpening / Contrast Enhancement
Hi, thanks for your answer, but I doubt that this is the problem because when I disable the function reshade stop doing it, plus the video card is new has no more than 5 months and is an AMD Asus Strix R9 fury.
thanks

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

More
5 years 1 week ago #119 by Ioxa
I haven't been able to reproduce the problem but I see a few possible causes. The multiply blend mode is the original image * the sharp/clarity mask * 2.0, so the brighter parts of the image get a lot brighter. The detail strength in the bilateral filter is the detail channel * detail strength, since you have the setting at 1.90 the bright parts are again getting a lot brighter. My guess is that combining the multiply blend mode in high pass and clarity and then multiplying the detail by 1.90 is causing some issues. Try reducing the detail strength to 1.00 and try some of the other blend modes. If that doesn't get rid of it try enabling each effect one by one to see if you can narrow it down a single shader that is causing the problem.
The following user(s) said Thank You: padolamap

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

More
5 years 1 week ago #120 by padolamap
Replied by padolamap on topic High Pass Sharpening / Contrast Enhancement
thank you very much, you can fix by changing these values, thank you very much for your great work
The following user(s) said Thank You: Ioxa

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