ScaleNx - Artifact Removal and Algorithm Improvement

I have noticed the crispness parameter in your xbr & scalefx releases as part of their respective deblur pass . However unlike your “g-sharp_deblur” , they don’t seem to be compatible with any presets but their own . I like how your crispness parameter has no downside effect on colors.

Any chance it can have wide range compatibility like your “g-sharp_deblur” or the old “deblur” ? or it can only work that way with their respective releases?

1 Like

That’s really tricky, because the specific shader needs to fetch pixels from two different sources and one has to be set in the preset (“SfxPass”, is also used in the shader). I like to mention that it’s really nice to colors, no clamping needed, but it doesn’t look nice with shaders which do color interpolation on their own, in other words, the basic scaler must produce crisp colors, like scalefx or xbr-noblend.

Edit: nice update with a g-sharp version.

https://mega.nz/file/MwoDhQLJ#NXjo_C-HnHZfwBqGANDEU8stKV0YH6YvA_LsgzDETz0

1 Like

Thanks mate, resampler vertical/horizontal combo is definitely lighter on the colors but the old g-sharp is a bit crisper (I mean their effect on NEDI3).

Are you aware of any shader pass that would introduce some sort of a stucco-like pattern that would be natural from the render it self.I don’t mean an overlay or a crt-xbr hybrid.

I tried jinc2-omniscale combination, While the preset is a crappy mess , I found that it produced a pattern that fell same color areas similar to an extend of scanlines. This will help give texture and avoid the wax/clay look and it seems to be produced from the render it self with no tax on brightness.

1 Like

I’m quite sensitive to details/artifacts, but a sort of good emboss should enhance the textures, maybe some noise as an afterpass.

Now to figure out how to make the game playable without overclocking my pc to 90 degrees xD

Desmume core:

Steam:

Can someone help me? I copy the shaders/glsl files into a flash drive and it’s not showing up on Retroarch running on Nvidia Sheild TV. The file doesn’t appear when i go to select shaders.

Omg, that looks beautiful! What shader is that? Also it seems that you applied the shader on both screens? For some reason if i load a shader while using the Hybrid layout the shader only works on the second screen not the main one, is this normal?

Hi all, quick question, can scale fx aa be used with increased internal resolution for the beetle hw core? I realised it kept crashing and only works if ran at 1x. alternatively i could use any multiplier and turn on supersampling and it works

1 Like

scalenx mutliplies the texture size substantially, so it’s probably exceeding your GPU’s max texture size. However, its pixel detection algo doesn’t work on chunks of pixels, so it wouldn’t help with >1x anyway.

2 Likes

scalefx 9x AA Shader 2.o x3 Scanlines Dream haze from a reshade shader ported here 720p desktop rez with x4 internal rez with shapen shader x4

1 Like

So, which is the fastest version? (Less heavy on the CPU/GPU)

Scalefx or Scalefx Hybrid?

Edit: after about two hours of testing, my results show that Scalefx is faster by 0.5 frames, in similar gameplay circumstances (both combined with crt easymode)

2 questions: Is there an even faster shader that produces similar visual eye-candy?

And, if i reduce/increase the treshold value in Shader Parameters, will this make it less, respectively more demanding one the system resources?

1 Like

Hey guys,

Any similar shader that works in Flycast core? For some reason this Scale family shaders work perfectly in mame and FBN cores, but not as good or at all in Flycast (2d games).

1 Like

Are you doing any internal resolution increases? If so, that will break any shader that uses pixel detection algorithms, like scalefx and xbr.

2 Likes

No, nothing like that. No upscale or anything other than all native. I was under the impression that the shader just doesn’t work on the type of rendering that Flycast does. On ppsspp core, at least in 2d games, it works just right as well, like in mame/fbn. So, it should definitely work in Flycast you say??

Edit: it turns out that if i lower the resolution from default 640 x 480 to 320 x 480, the shader works as intended. Sadly, except for Capcom Vs Snk 2, the other 2d games i tested, display those graphical glitches (small lines and squares) arround the characters, that always happen when playing 2d games at other than native resolutions.

So the shader only works it seems on 240 p res.

2 Likes

It’s going to depend on pixels being individual pixels and not blocks of pixels, whether that’s how the game was originally designed or not.

For example, in games like CvS2, where they mix 2D and 3D, the sprites are “natively” some other size and are scaled to match the overall output, and that pre-scaling is what’s breaking the detection.

1 Like

so what about the fsr shader along with this, should we set this before or after scalefx? And will it still function properly?

1 Like

You would put it after. Putting it before would screw up the pixel detection algo.

2 Likes

fsr shader doesnt seem to work with this at all. After pressing apply, it just reverts back to the previous shader preset that works. Any reason why?

2 Likes

You can try this from the ‘preset’ directory:

shaders = 11

shader0 = ../stock.slang
alias0 = refpass
filter_linear0 = "false"

shader1 = ../scalefx/shaders/scalefx-pass0.slang
filter_linear1 = false
scale_type1 = source
scale1 = 1.0
float_framebuffer1 = true
alias1 = scalefx_pass0

shader2 = ../scalefx/shaders/scalefx-pass1.slang
filter_linear2 = false
scale_type2 = source
scale2 = 1.0
float_framebuffer2 = true

shader3 = ../scalefx/shaders/scalefx-pass2.slang
filter_linear3 = false
scale_type3 = source
scale3 = 1.0

shader4 = ../scalefx/shaders/scalefx-pass3.slang
filter_linear4 = false
scale_type4 = source
scale4 = 1.0

shader5 = ../scalefx/shaders/scalefx-pass4.slang
filter_linear5 = false
scale_type5 = source
scale5 = 3.0
alias5 = SMAA_Input

shader6 = ../anti-aliasing/shaders/smaa/smaa-pass0.slang
filter_linear6 = true
scale_type6 = source
scale6 = 1.0

shader7 = ../anti-aliasing/shaders/smaa/smaa-pass1.slang
filter_linear7 = true
scale_type7 = source
scale7 = 1.0

shader8 = ../anti-aliasing/shaders/smaa/smaa-pass2.slang
filter_linear8 = true
scale_type8 = source
scale8 = 1.0

textures = "areaTex;searchTex"
areaTex = ../anti-aliasing/shaders/smaa/AreaTex.png
searchTex = ../anti-aliasing/shaders/smaa/SearchTex.png

shader9 = ../fsr/shaders/fsr-pass0.slang
filter_linear9 = true
scale_type9 = viewport
scale9 = 1.0
wrap_mode9 = clamp_to_edge

shader10 = ../fsr/shaders/fsr-pass1.slang
filter_linear10 = true
scale_type10 = source
scale10 = 1.0
wrap_mode10 = clamp_to_edge

parameters = "SMAA_EDT;SMAA_THRESHOLD;SMAA_MAX_SEARCH_STEPS;SMAA_MAX_SEARCH_STEPS_DIAG;SMAA_LOCAL_CONTRAST_ADAPTATION_FACTOR;SMAA_CORNER_ROUNDING;FSR_SHARPENING;FSR_FILMGRAIN;FSR_GRAINCOLOR;FSR_GRAINPDF"
SMAA_EDT = 1.0
SMAA_THRESHOLD = 0.05
SMAA_MAX_SEARCH_STEPS = 40
SMAA_MAX_SEARCH_STEPS_DIAG = 20
SMAA_LOCAL_CONTRAST_ADAPTATION_FACTOR = 2.5
SMAA_CORNER_ROUNDING = 50.0
FSR_SHARPENING = 0.1
FSR_FILMGRAIN = 0.3
FSR_GRAINCOLOR = 1.0
FSR_GRAINPDF = 0.3

Check out these circles:

6 Likes

thanks! i see alot of new line entries. what’s actually keeping them from being paired when a default user tries to pair them or other normal shaders?

1 Like