Welcome, Guest.
Username: Password: Remember me

TOPIC: Smooth Edges

Smooth Edges 2 months 3 weeks ago #1

I was wondering if it was possible to achieve an edge softening effect, like a simple gaussian blur filter just on the edges of the image.
I'm a fan of sharpening filters, but it's very easy to encounter ringing artifacts / oversharpening.
Ringing artifacts on wikipedia

Examples of ringing:
Warning: Spoiler! [ Click to expand ]

There are also some games that by default provides too strong sharpening filters in their post-processing settings,
so an edge softening filter would help.

Here's an example of what I'm thinkin about:

Source:
Warning: Spoiler! [ Click to expand ]


I know that Reshade's FXAA filter could be used, but it messes with already - anti aliased images.
Here's what happened when I tried it in For Honor (both images are with in-game anti aliasing set on TAA).

(click to enlarge)
Last Edit: 3 weeks 6 days ago by Duran.te.
The administrator has disabled public write access.
The following user(s) said Thank You: BeTa, Viper_Joe

Soft Edges / Oversharp Fix 2 months 3 weeks ago #2

Well, funnily I've just implemented a way to reduce halos in my sharpening shader. It's nothing sophisticated, but I'm quite satified with the results. Basically I'm just adding sharpness depending on pixel brightness, thus reducing edges in high-contrast areas (like skies).

Here's a comparison (left: original, middle: less sharpness for bright pixels, right: standard sharpness)


Of course due to the uneven sharpening some details can look slightly odd (text etc.), but imo it can achive better results than by just clamping the unsharp mask.
Maybe I will post the code here soon. Although it may lack context, here is the important line:
fine *= (1-saturate(pow(abs(color.xyz), 1 / (fSharpen_DynamicCurve + 0.001))));
Last Edit: 2 months 3 weeks ago by brussell.
The administrator has disabled public write access.
The following user(s) said Thank You: BeTa, Viper_Joe, Duran.te

Soft Edges / Oversharp Fix 2 months 3 weeks ago #3

Check out this topic reshade.me/forum/shader-presentation/395...n?limitstart=0#26156

Created sharpening filter that addresses just that issue using depth high-pass mask and it's already in default repository under FilmicAnamorphSharpen.fx



Depth pass is required for it to work, but you can also try using "Sharpen clamping" setting without depth pass to reduce halos.
If you're looking for more performance-wise version without depth masking, visit my Shaders repository (link under my profile information at the bootom of this post), look for FilmicSharpen.fx
Last Edit: 2 months 3 weeks ago by Fu-Bama.
The administrator has disabled public write access.
The following user(s) said Thank You: Duran.te

Soft Edges / Oversharp Fix 2 months 2 weeks ago #4

This certainly solves the first problem. However, as I mentioned above, there's nothing to do with already - oversharpened images, in that case an edge softener shader would help a lot.
The administrator has disabled public write access.