Gaussian blur shader, gaussian resampler, more resamplers

The shaders itself have dynamic range, quite hard to profile, but i like to use the Imageviewer core in Retroarch with a test image. It’s a bit more realistic as RL performance is measured. I also used GPU ShaderAnalyzer, but it didn’t distinct between normal and special functions.

Color calcs gave me decent results with deblur, although i had a luma-deblur running quite a while ago. I think it’s comes into consideration for a performance version indeed.

Otherwise the new deblur shader is quite fast, if you use small loops. It could be optimized, as well as presets, but i try to avoid too much version entropy.

2 Likes

I got access to the shader repos again, so I can finally merge in you guys’ stuff, I just haven’t gotten around to actually doing anything with it yet. I’ll merge in the outstanding PRs in the next day or two and then we can see about getting you and @Hyllian’s stuff up to the latest versions.

7 Likes

Thanks @hunterk. The crt-guest-dr-venom2 is finished i guess, also considering the feedback.

I also want to calm the spirits a bit with the new shader presets posted in this topic. :upside_down_face: I posted more ‘extreme’ smoothing setups, but it goes the other way also, regarding scalefx and in general.

4 Likes

Been working on a very sharp ScaleFX upscaler recently and i’m also surprised with the results. It can upscale to any resolution quite well, but did only try 4k in virtual mode above 1080p. It’s also capable of some AA without extra pass, which can be nice.

Will post it on Github soon.

3 Likes

Looking good. Are you using deblur and some aa to get this? (The vanilla scalefx is noblend)

On a side note, xbr uses analytic line functions to be resolution independent. The only drawback is that it gets too complex to create a lvl6 shader as scalefx. Scalefx is fixed at 3x res, though it gives simplicity to achieve lvl6. Anyway, it gives me some idea I could work on xbr-noblend to achieve lvl6 by fixing resolution at 3x too…

2 Likes

Yes, i modified deblur somewhat, but didn’t expect consistent results. I guess it’s an experimental method, but is working quite ok. :smile:

It’s on github now. For smother results last pass can do some over scaling also.

2 Likes

Hey mate , thanks for your efforts.

the preset you just posted fail to load for some reason , I put them in the appropriate folder and what not , would you please upload the recompiled version on any hosting site? thanks

I’m getting some weird results , is the shader supposed to be used on 4k?

1 Like

These might be precision issues related to high deblur or sharpness parameters. I pushed them a bit regarding the range, but that’s the limits of my adapter, other might have different ceils.

Could you please report the parameter range in which it’s still without glitches? Also changed the file on github…might work better now.

I only used the default parameters values. That being said ,I have tried multiple adjusts of the parameters but even on lowest values, the glitch persists

1 Like

Should be fixed now. The bad was my adapter/drivers compensate too many exceptions in by covering it up. :smile:

Found another “invisible” bug, added two more shader modes, for smoother or sharp definition.

1 Like

can confirm , it’s working now. level of detail is kinda on low side tho :upside_down_face: espcially compared to NEDI3 , but I do like the crisp look.

1 Like

I’m continuing my work on the same topic (resamplers), and i guess these are good results for now with downsampling too…

A custom width custom lanczos kernel is used this time.

Example:

ordinary filter size:

Increased filter size:

Need to do some stuff, i guess i’ll release the shaders soon.

7 Likes

Hey, that’s a nice idea! Looks like a smart resampler.

4 Likes

This example looks like a really nice antialiasing effect :grinning:

4 Likes

Here are the shader files with some presets for the “new” Lanczos resampler.

Download link:

https://mega.nz/file/whAlFDYJ#H68MzUoJxR7jmppfQU3mTuVAQKKHjwJOIVuabKaAPVc

It’s a two pass composition, but can be also used separately if needed.

The benefits are that filter range can be adjusted, which can be really nice for downsampling…

Good use cases:

  • downsampling to a low resolution
  • downsampling super-sampled sources to viewport
  • antialiasing scaled graphics (xbr, scalefx…)
  • edge smoothing on high resolution content (PSX, PS2, DC,…)
  • can be also used as an ordinary resampler
6 Likes

I was looking at screenshots from my CRT to better match what it does on filtering, and i think windowed are the closest indeed.

raw screenshot

After applied gaussian on GIMP to “remove” mask etc to view shapes better.

bright pixels definitely enlarge, mostly horizontally “shaping” a kind of curve, or “spikes” to better describe it

3 Likes

Tested here and they worked as expected! Very useful for downsampling! Congrats!

3 Likes

Tried with ps1 @1080p internal resolution,

  • filter range 3.5
  • sharpness 1.3
  • downsample 5

“240p” content

raw

shader on

with “hi res” content I like double scan ON

raw

shader on

:+1:

3 Likes

As single pass resamplers have some benefits, i have developed a new “g-sharp2” single pass resampler.

Compared with the first version, the benefits are:

  • much faster with same filter range (approx 2x)
  • better image processing
  • can be much faster with downsampling (due to range boost with same # of lookups)

@HyperspaceMadness can you do some “DREZ” testings? Should do quite better then the first version. I belive it could be a good upgrade.

Edit: 2-pass version added.

Screenie (2-pass version):

Edit: 2-pass version tweak, better AR

Download link:

https://mega.nz/file/4kxVhawQ#N_GMHOnzqudbX4vL3jkyRmomYlDIrKGsgJDr1AaNVrU

9 Likes