ScaleNx - Artifact Removal and Algorithm Improvement


#41

look at my shader preset, it combines new & old Favorit.zip (792 Bytes) its far more authentic:

(set the zoomlevel to 50% and you can imagine what it looks like on your retroarch)

oh yeah, change your retroarch-shader-paths in the attached Favorit.cgp-file (with notepad++ for example)


#42

@Silverbreaker ok, but I would prefer it if you wouldn’t hijack my thread for you shader preset, especially if it has nothing to do with ScaleFX. you already created your own thread. if you want to have more attention, I would suggest delivering some screenshots instead of posting about it in threads about other filters. thanks.

the thread for xBR is over there: http://libretro.com/forums/showthread.php?t=88


#43

you’re right, sorry about that … (btw. its not only xbr - its the combination of xbr + blur + ntsc + crt + color/setting adjustments)


#44

I registered just to say, you should totally try this with downsampled rendering.

Either with a custom resolution or using Nvidia DSR/ AMD VSR with a 2x2 (4.0x)factor. With DSR, use a low smoothness value like 15-20%.

You won’t be able to capture that result, but if you have FastStone you can take the screenshot put out and downsample it by 0.5 in each direction with a lanczos 2 filter to get an approximation.

I’m just curious to see the results


#45

[QUOTE=Sp00kyFox;36720]the wait is over. I finished my filter so far and it’s available on the shader repository (you can get it by using the “Download Zip” button on the main page). from now on ScaleFX can be found under the main folder scalefx:

here are the noteworthy changes:

  • reduced the number of passes to 4 (all metric work is now done in the first pass) -> better performance
  • improved edge rules -> more anti-aliased edges are interpolated
  • fixed: sometimes little bumps would appear on edges if an interpolation was tangent to it
  • improved performance in the final pass by removing a lot of unnecessary switch-case structures

and here are some examples. in the case of SF3 and the Wadjet Eye adventure games I used ScaleFX-hybrid:

http://screenshotcomparison.com/comparison/167831 http://screenshotcomparison.com/comparison/167832 http://screenshotcomparison.com/comparison/167833 http://screenshotcomparison.com/comparison/167840

(ps: hardcoregaming101.net is a great source of unaltered pixelart screenshots with original resolution)

I hope you enjoy it!

[/QUOTE]

Lol as soon as I get my shaders set to the X-soft method you recommended, you go and release this amazing thing…

Seriously, it looks PHENOMENAL. and I look forward to setting it all up again. (No sarcasm) Thank you for all your hard work. My 2D games look more gorgeous than they ever did through the rose tinted shades of nostalgia.


#46

Would it be possible to make a short list of the games you put on display here? I’ve never seen like half of these and some of them look really cool (Made even cooler by your shader, obviously :wink: )


#47

sure. here is the list in the same order:

  1. Street Fighter III: 3rd Strike (CPS3)
  2. Akumajou Dracula X: Chi no Rondo (PCE) 3-4. Blackwell Epiphany (Win)
  3. Golden Sun (GBA) 6-7. Cybernator (SNES) 8-9. Mega Man 7 (SNES) 10-11. Mega Man X (SNES)
  4. Castlevania: Dracula X (SNES)
  5. ActRaiser 2 (SNES)
  6. Demon’s Crest (SNES) 15-17. Pulstar (Neo Geo)
  7. Shovel Knight (Multi) 19-20. Last Resort (Neo Geo) 21-22. Shardlight (Win)
  8. Mystik Belle (Win) 24-25. Joe & Mac (Arc)
  9. Sly Spy (Arc) 27-28. Sam & Max: Hit the Road (DOS)
  10. Top Hunter: Roddy & Cathy (Neo Geo)
  11. Shantae: Risky’s Revenge (NDSi, Win)
  12. Technobabylon (Win)
  13. Batman Returns (SNES)
  14. Mega Man 8 (PSX, Saturn)
  15. Dodonpachi (Arc, PSX, Saturn)

#48

That’s amazing, thank you! I’ll have to grab some of these.

How are you running the shaders on windows games though? (Is this a dumb question? I feel like I’m asking a dumb question lol)


#49

I just don’t, lol. yeah, I wish I could but I just loaded up a screenshot with the “Imageviewer” core. a libretro directx hook would be awesome, but right now there is no such option to my knowledge.


#50

wow, it looks incredible! It looks like this is how good it can get or is there room for improvement still? Great job!


#51

[QUOTE=Hyllian;36728]It looks great! The slopes in level 6 are very good!

Maybe there’s some way to blur a bit less than xSoft, to make it a bit more crispy. IMO, I think that xSoft damage the colors too much.[/QUOTE]

I think i can help a bit. I added a de-blur code section to the 4xSoft which makes it more crispy, in fact, it’s very customizable.

I’ll explain how to tweak it.

This code line manages it all: float filterparam = clamp(2.25*dif, 1.0, 2.0);

If you use for example: float filterparam = clamp(2.25*dif, 1.0, 1.0); then there will be no change compared with 4xSoft.

If you use float filterparam = clamp(2.25*dif, 2.0, 2.0); instead, then every “situation” will get deblured with factor 2.0.

Another interesting setup could be: float filterparam = clamp(2.75*dif, 0.25, 2.0); where similar pixels will get additional blur while there will be sharp contrast on the whole.

The algorithm evaluates the situation (surrounding pixels) and calculates how much deblur it applies, but it must be clamped, because filter values below 1.0 blur the image additionally. (can be helpful sometimes). If we clamp the value between 1.0 and 2.0 then similar looking pixels will stay original while “sharp” situations will get deblured depending from the situation.

It’s a subject of testing and personal preferences…

I hope this shader will be helpful for the excellent ScaleFX or any other filter (high regards to the author) and a satisfying setup will be found / used.

Best regards, guest.r


#52

Hey guest.r, welcome! Thanks for all the fantastic shaders you’ve given the community over all these years :slight_smile:


#53

Hey hunterk! Nice to meet you. It’s a privilege.

I’m in awe and amazement over what’s going on here with emulation and shaders. And i’m glad some of my shaders are still considered useful lol.

My personal gol was to code a PS 2.0 2x or 4x scaler with no color comparisons, no logic used or very crude logic. But this postprocessing thingie is really addictive.

Some real effort was put into it by various contributors and it got past industrial/corporate level which i find outstanding.

Everybody keep up the good work!

Regards, guest.r


#54

I have done some work regarding a scalefx presets and found a nice combination. The idea is to apply a smoothing-sharpening filter just before xsoft and there are some good results.

I’m adding the sharpsmoother shader and the preset if anyone wants to give it a try. (sharpsmoother.cg goes into the blurs folder, the preset into the scalefx).

A comparison:

http://screenshotcomparison.com/comparison/176720


#55

Oh yeah, that’s nice! It really smooths out a lot of the upscaling-signature squiggles.

I added it to the common-shaders repo :slight_smile:


#56

back again. I’m planning to revisit the filter and port it to the new vulcan shader specification and I’ve got a more promising idea of how to combine it with reverseAA. though this is still more like an extra, in the first place scalefx is an interpolation filter for pixelart.

just wanna mention one thing, because I saw it misinterpreted here and there. there is no scalefx9. scalefx itself is a filter which triples the resolution and nothing more. the preset (cgp-file) I called scalefx9 is just scalefx used twice to achieve a resolution which is nine-fold (3 times 3). the notation is derived from the scaleNx filters (also known as advmameNx) where the N stands for the factor in which the resolution is increased. the number does NOT stand for the interpolation level which in the case of scalefx is simply 6, there are no variations of it. I hope this makes it clearer.


#57

Ah, yes, thanks for clearing that up, and I look forward to your slang port. I’ve tried porting both it and xbr-lv4-multipass and failed when it comes time to untangle all of the bool4 comparisons.


#58

[QUOTE=Sp00kyFox;52472]back again. I’m planning to revisit the filter and port it to the new vulcan shader specification and I’ve got a more promising idea of how to combine it with reverseAA. though this is still more like an extra, in the first place scalefx is an interpolation filter for pixelart.

just wanna mention one thing, because I saw it misinterpreted here and there. there is no scalefx9. scalefx itself is a filter which triples the resolution and nothing more. the preset (cgp-file) I called scalefx9 is just scalefx used twice to achieve a resolution which is nine-fold (3 times 3). the notation is derived from the scaleNx filters (also known as advmameNx) where the N stands for the factor in which the resolution is increased. the number does NOT stand for the interpolation level which in the case of scalefx is simply 6, there are no variations of it. I hope this makes it clearer.[/QUOTE]

I would love it if there was a way to read a description like this on each shader while in retroarch. Often I have no idea what is happening, just whether or not I like it.

Knowing these details gives me ideas for what to mix it with to make my own presets.


#59

Yaaay, spookyfox! Hope you can get that Reshade version in too some time or another. Or even a PCSX2 and EPSXE version. Really appreciative of these shaders.

Edit: just saw inbox. Had forgotten that I asked you this very thing in inbox. Just ignore then since you already gave an answer there :slight_smile:


#60

improved AA-detection in the non-hybrid version: http://screenshotcomparison.com/comparison/195228