xBR algorithm tutorial

It works and what should i say…WOW. Love your work ! thx alot

@hunterk where can i find the “3D” super xbr-shaders ?

Edith: sry for the late reply…had a exhausting week at work

Just wanted to show the results I am getting with your awesome shaders. It is my own combination of super - 4xbr - 3d, super - xbr, alot of deposterize and aa shader lastly. Over that I uses ReShades sharpening and alot of debanding and finaly some color and hdr presets. The most important part I do is I run this in 4k fullscreen with Nvidia’s DSR. It makes the scaling algorithm look better along with the debanding.

Glad you like it. If you use the cg versions, the 3D shaders are at the folder.

Nice pics!

I’ll update the 3D shaders with new parameters I found. With these, the fonts, huds and dithering are less rounded, which contribute to a more consistent image structure.

EDIT: I just updated repo with new versions of these 3D shaders using new parameters.

1 Like

I dont remember how I got them, but I prefer these, they make the backgrounds most rounded and clean I think. Maybe you can tell me why they are so different?

Not a big difference. Just a bit less rounded. If you like old version, keep it.

A new version called xbr-lv2-small-details.cg released today. It’s less harsh to dithering and textures in general.

Small-details: Standard: Small-details: Standard:

1 Like

Hello Hyllian, big fan of your work

I have request, can you please release a modified version of your “super-8xbr-3d-6p.glslp” with a bit sharper and lighter colors similar to “scalefx-hybrid.glslp” , here are pics of your “super-8xbr-3d-6p.glslp” and “scalefx-hybrid.glslp” at native

I wish I didn’t had to bump this thread as I’m unable to PM. That being said, I am one of a g’mic developer and I’m looking to add pixel art scaling tool to g’mic-qt so that gimp and krita users could get easy access to the tool. It is not clear what @Hyllian means by this

For that reason, from now on, all algorithm terms will be related to the down-right edge. You’ll have to apply the same rules to the other three edges by symmetry.

I know that you have to apply the same rules, but what condition should there be for accepting one edge or the other edge? Max difference?

You should see the shaders on Retroarch repository. There you’ll see the conditions. This tutorial is outdated.

Anyway, I’m back working on super-xbr shaders. After some years I decided to see its parameters and figured out I should change some of them. At the same time, I ported Anime4k hlsl shaders to cg and it work well after super-xbr by doing an slightly dilation and using gradients to enhances edges.

Some screens (super-xbr + anime4k):

Full size: https://img.onl/iFJbhA

Full size: https://img.onl/2Z3Gc7

Full size: https://img.onl/etEksE

Full size: https://img.onl/6jIuBM

Full size: https://img.onl/NyawaY

Full size: https://img.onl/2cIkTs

https://img.onl/zFbFDE

https://img.onl/N9czm5

https://img.onl/rTJEp

Oh wow, are these in your PS3 pack in the other thread, as well? I’ve tried to port the GLSL version to RA, but it was ~30 passes -_-

These screenshots look awesome, btw.

EDIT: also, did you do the proposed FXAA step (presumably between steps 4 and 5)?

No, RA 1.0.0.2 for PS3 can’t run. I’m using my old notebook to run them. They’re 11 passes! 2x3 sxbr + 1x1 catmull-rom + 1x4 anime4k passes. I didn’t use FXAA.

These anime4k shaders are the old ones in hlsl. They’re very simple. I like the layer it apply to the whole screen. It works by making a gentle dilation just before a push in edge gradients. I didn’t push it too much, because the effect can degrade in “xylograph” very fast.

I’ll let here a version without further optimizations if you’re interested in test:

super-xbr-6p-anime4k cg shaders and preset - beta

The super-xbr shaders on RA repo are using outdated params, so I have included the new ones.

1 Like

Great job on the shader Hyllian, if I may suggest to add some sort of noise effect to give the render a bit of “density” look instead of the “clay/wax” look .

See album

This is something to add, indeed. Though it should be an independent shader implemented on its own pass. The same way as anime4k is just a separated filter (a sharpening-like method), which can be used with any other.

Glad you’re considering the idea . Here is a preset I modified ,it works well for games with big sprites such as fighting games but it lacks the thin edges your xbr-Anime4k preset provide , it would be great to have the best of both worlds . Use it with vulkan render (it’s very hardware demanding)

https://mega.nz/file/YMBDxAII#5UXt5jzIhfFII2P3c3pwoGgF_6id4lU64kOCn74No3k

Here is an album for the preset I have posted , I like how the details are maintained and how the color graduate. On the other hand , edges and colors vibrance/fidelity leaves more to be desired:

Too many shaders there! kkk I doubt it doesn’t degrade image at some point.

A gentle sharpening method after an upscaling is recommended. But you are using so many sharpeners that the textures were chewed multiple times. It has created some kind of mosaic.

Yeah , I figured as much :sweat_smile: .I was going for close to ESRGAN sort of look Which is pretty much down right Impossible. sharping the NEDI3 too much gives an ugly artifacts which I masked with slow-bilateral. With your xbr-Anime4k that won’t be necessary.