New Luma Sharpen
- Wicked Sick
Please Log in or Create an account to join the conversation.
- DeMondo
- Chavolatra
i use adaptive sharpen with unsharp mask and have more better combination for games ?
Please Log in or Create an account to join the conversation.
- sets
Please Log in or Create an account to join the conversation.
- Sunesha
sets wrote: not liking this shaders, it makes the colors brighter
Try to lower the Sharpen Clamp Value to lower values and it will not "brighten" so much. May need to bump the sharp values
Please Log in or Create an account to join the conversation.
- Sunesha
Marvelous, I played around with it. It is really awesome, it works really good.Fu-Bama wrote:
Ok, I added depth mask to the shader.
By default it's set to preview mode for the sharpening start and stop.
I hit some snags, it seems that the shader is not working with weird depth outputs. For example the games tried with reverse depth output, like Dishonored 2, Fallout 4 and Kingdom Come Deliverance where I could only sharpen the foreground as probably because of the reversed depth output. However the game could use just fine was Hitman that doesn't has its output reversed. Not sure if did something wrong or not, I tried to use Pre-Processor settings to flip it around without results. I know that unity engine based game has the output mirrored.
I think start understand the shader correctly. After red color it sharpens and green means it doesnt sharpen. Blur near and far is to blend the red color and green color sharpen nicely. Depth gamma for how much to blend the depth based mask you created. At least this is to my undestanding, would love to be corrected
Thank you so much for working on this shader. I thought about how cool a depth based sharpener would be for long time so it is so cool to have one in the toolbox.
I try do a small instruction video of the shader as a thanks when gotten more used to the shader
Please Log in or Create an account to join the conversation.
- Sunesha
This really works well and super easy to use. Not sure how you did pull this off. I really like how it just leaves shape outlines alone. The effect is real nice. Think sharpening high frequency detail far away just lead to well contrasted pixels. Especially out lines gives a weird unnatural contrast when sharpnend. Thought that is kinda what sharpen does.Fu-Bama wrote: I also made Panavison-like sharpen version that has Depth high-pass mask.
It gives some interesting results
Looks really natural and still sharpens stuff like roughness of a wall. It is kinda like a automatic selective sharpener.
Please Log in or Create an account to join the conversation.
- Sunesha
I mentioned it when speaking of the Filmicdepthsharpener, depth input is not responsive to the reshader preprocessor Definitions. So the shader is just behaving correctly if depth is "normal", meaning when reversed, upside down or logarithmic it is like stated. Which of course limit shader working correctly with many games. To illustrate what I mean, I attached a image of Unity engine game, which almost always has a upside down depth input.
You probably aware of this limitations, but in case you was not took time time to whine about it
The reshade pre-processor depth I am referring to (saved in dxgi.ini or similar)
RESHADE_DEPTH_LINEARIZATION_FAR_PLANE=1000.0
RESHADE_DEPTH_INPUT_IS_UPSIDE_DOWN=0
RESHADE_DEPTH_INPUT_IS_REVERSED=0,
RESHADE_DEPTH_INPUT_IS_LOGARITHMIC=0
Please Log in or Create an account to join the conversation.
Sunesha wrote: Congrats on finishing Filmic Anamorph Sharpen to the shader github.
I mentioned it when speaking of the Filmicdepthsharpener, depth input is not responsive to the reshader preprocessor Definitions. So the shader is just behaving correctly if depth is "normal", meaning when reversed, upside down or logarithmic it is like stated. Which of course limit shader working correctly with many games. To illustrate what I mean, I attached a image of Unity engine game, which almost always has a upside down depth input.
You probably aware of this limitations, but in case you was not took time time to whine about it
The reshade pre-processor depth I am referring to (saved in dxgi.ini or similar)i.imgur.com/TrqvLiC.pngRESHADE_DEPTH_LINEARIZATION_FAR_PLANE=1000.0 RESHADE_DEPTH_INPUT_IS_UPSIDE_DOWN=0 RESHADE_DEPTH_INPUT_IS_REVERSED=0, RESHADE_DEPTH_INPUT_IS_LOGARITHMIC=0
It's fixed now, you can download new package.
Please Log in or Create an account to join the conversation.
- Sunesha
Fu-Bama wrote: It's fixed now, you can download new package.
Thank you, much appreciated
Please Log in or Create an account to join the conversation.
- thalixte
Please Log in or Create an account to join the conversation.
Or just jump here: github.com/crosire/reshade-shaders
Please Log in or Create an account to join the conversation.
- thalixte
Please Log in or Create an account to join the conversation.
- conan2k
Fu-Bama wrote: When you install ReShade on some game it will ask you for permission to download filters. That's one way to get it.
Or just jump here: github.com/crosire/reshade-shaders
Sorry if I'm missing something but there is only "FilmicAnamorphSharpen.fx" in the ReShade repository. Is the updated "FilmicSharpenWithDepth.fx" available somewhere (the one with fixes for depth-related issues mentioned by Sunesha)?
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
- B4rr3l
Please Log in or Create an account to join the conversation.
B4rr3l wrote: actually, performance is worse than default 3.1.2 Luma sharpen and I found it more jagged, just to let you know.. 0.08ms for luma sharpen vs 1.4ms for Filmic and luma was more efficient and the trees got less jagged and brighter, when I set clamp values to 0.85 and strong to 0.9 it got a bit better but still not as good as default luma sharpen.
FilmicAnamorphSharpen uses 4 samples per pixel for Back-Buffer (RGB) and 8 samples for Depth (Gray). I think that's the main performance eater.
You may want to try luma sharpen without depth-edge masking functionality:
/*
Filmic Sharpen PS v1.0.5 (c) 2018 Jacob Maximilian Fober
This work is licensed under the Creative Commons
Attribution-ShareAlike 4.0 International License.
To view a copy of this license, visit
http://creativecommons.org/licenses/by-sa/4.0/.
*/
////////////////////
/////// MENU ///////
////////////////////
uniform float Strength <
ui_label = "Sharpen strength";
ui_type = "drag";
ui_min = 0.0; ui_max = 3.0; ui_step = 0.005;
> = 1.0;
uniform bool Preview <
ui_label = "Preview sharpen layer";
> = false;
uniform int Coefficient <
ui_label = "Luma coefficient";
ui_tooltip = "Change if objects with relatively same brightness but different color get sharpened";
ui_type = "combo";
ui_items = "BT.709\0BT.601\0";
> = 0;
uniform float Clamp <
ui_label = "Sharpen clamping";
ui_type = "drag";
ui_min = 0.5; ui_max = 1.0; ui_step = 0.001;
> = 1.0;
uniform int Offset <
ui_label = "High-pass offset";
ui_tooltip = "High-pass cross offset in pixels";
ui_type = "drag";
ui_min = 0; ui_max = 2;
> = 1;
//////////////////////
/////// SHADER ///////
//////////////////////
#include "ReShade.fxh"
// Overlay blending mode
float Overlay(float LayerA, float LayerB)
{
float MinA = min(LayerA, 0.5);
float MinB = min(LayerB, 0.5);
float MaxA = max(LayerA, 0.5);
float MaxB = max(LayerB, 0.5);
return 2 * (MinA * MinB + MaxA + MaxB - MaxA * MaxB) - 1.5;
}
// Convert RGB to YUV.luma
float Luma(float3 Source, float3 Coefficients)
{
float3 Result = Source * Coefficients;
return Result.r + Result.g + Result.b;
}
// Sharpen pass
float3 FilmicSharpenPS(float4 vois : SV_Position, float2 UvCoord : TexCoord) : SV_Target
{
float2 Pixel = ReShade::PixelSize * float(Offset);
// Sample display image
float3 Source = tex2D(ReShade::BackBuffer, UvCoord).rgb;
float2 NorSouWesEst[4] = {
float2(UvCoord.x, UvCoord.y + Pixel.y),
float2(UvCoord.x, UvCoord.y - Pixel.y),
float2(UvCoord.x + Pixel.x, UvCoord.y),
float2(UvCoord.x - Pixel.x, UvCoord.y)
};
// Choose luma coefficient, if True BT.709 Luma, else BT.601 Luma
static const float3 LumaCoefficient = (Coefficient == 0) ?
float3( 0.2126, 0.7152, 0.0722) : float3( 0.299, 0.587, 0.114);
// Luma high-pass
float HighPass;
for (int s = 0; s < 4; s++)
{
HighPass += Luma(tex2D(ReShade::BackBuffer, NorSouWesEst[s]).rgb, LumaCoefficient);
}
HighPass = 0.5 - 0.5 * (HighPass * 0.25 - Luma(Source, LumaCoefficient));
// Sharpen strength
HighPass = lerp(0.5, HighPass, Strength);
// Clamping sharpen
HighPass = max(min(HighPass, Clamp), 1 - Clamp);
float3 Sharpen = float3(
Overlay(Source.r, HighPass),
Overlay(Source.g, HighPass),
Overlay(Source.b, HighPass)
);
return (Preview) ? HighPass : Sharpen;
}
technique FilmicSharpen
{
pass
{
VertexShader = PostProcessVS;
PixelShader = FilmicSharpenPS;
}
}
What game have you used for testing? DX9, DX11 or OpenGL?
Can you send picture of those jagged trees?
Please Log in or Create an account to join the conversation.
- Chavolatra
Please Log in or Create an account to join the conversation.
- knowom
support.apple.com/library/APPLE/APPLECAR...1/S0353_GradBlur.png
Basically a lot like this except with a unmask sharpener rather than a blur and split vertically from the center of the image to the screen edges. You could even has a toggle for a second pass to split it in the middle horizontally as well for more of a cross hair outward based sharpen effect.
Please Log in or Create an account to join the conversation.
- Pdguru