Koko-aio shader discussions and updates

Considering that final fight (384x224) reaches about 100fps with that preset here (i5-4590), yeah, it seems we are 20% under for championship sprint, at least on paper. Roughly.

However I think i tried to play hires games that don’t use hardware renderers (so mame) and they were ok; I’ll tryn) asap.

Btw, you’ve several options you can mix and I’ve read tou already tried config-user.txt, but still:

  1. config-user.txt turn parameters static, used fully, gave me 25% boost, it should suffice, but not that handy.

  2. again, config.txt, have you already used:
    #define HALVE_BORDER_UPDATE 1.0
    #define SKIP_RANDOM 1.0

  3. still config.txt:
    #define DELTA_RENDER 1.0
    then tune the relative parameters: (I use the following on my s10 to save battery, limit throttling and gain fps):
    #define DELTA_RENDER_FORCE_REFRESH 7.0 #define DELTA_RENDER_CHECK_AREA 3.0

Delta render works very well for static content like Championship Sprint.

  1. This would easilly double ypur fps allowing me to play Flycast 640x480 (which taxes the gpu by its own (being hardware redndered) at 1080p with shader on:
    In shader menu, turn the pass named flick_and_noise from 2x to 1x scaling and apply the changes.

After that some effects will cease to work like fxaa, other will behave different (glow blur pass may need sharpness adjust), but that is not that important for hires content.

This is what Batpcera uses for hires content. maybe I should release some 1x presets.

I’ll update this post as soon as I’ll test CS on my intel rig.

EDIT- Just checked, and without any mod on my side, I can reach 70+ fps without any special setting.
Don’t pay attention to the scanline size, it is so because the shader is interlacing it:

This is on Archlinux with GLCore, with an Intel® Core™ i5-4590 CPU @ 3.30GHz

3 Likes

Hmm, thank you for the ideas and for testing! I am pretty new to going any deeper with shaders than switching presets, so will try your ideas out. I’ve got another machine running Batocera on an i5-4670s, and I see the same low FPS there. I’m using Vulkan on the Batocera machine, though, and was trying the various Duimon presets it includes. I see the FPS drop for other games with the same res like Super Sprint and APB. I don’t know what the right term is, but the screen shakes and hops on those games, too. Arch Rivals is another game that shakes and hops really bad, but it’s at a different res and runs at 30hz. Seems likes maybe there are some RA settings I need to tweak rather than tweaking the shader settings.

Your cpu seems slightly faster than mine.

It has to be something specific with your system (to start with, i never tried running koko-aio on windows on my Haswell).

But the fact that you are testing Batocera too, which is Linux, puts the blame to something different than the operating system.
Batocera uses Vulkan (which is not well supported on Haswell and for me it gives lower performances), so I’d try to switch to GLCore there (remember to restart retroarch after the change).

As per the “shake”, if you mean continuous line flickering up and down, then it is because the shader is emulating the interlacing seen in old CRTs.

The effect does not appear to be good when the core refresh is just 30fps, and maybe you would not like it on 60fps games (supersprint).

You can turn it off; set flicker power to 0.0.

Optionally, you can set Hi-res scanlines type to 2.0 to clear the rest of the flickering.

You could seek help with Batocera on Discord; there is a thread specific to koko-aio, User Duglim adapted some “tweaked for speed” shader-sets based on koko-aio.

1 Like

Thanks again, I will start trying some of this stuff out later today. All of my issues seem to be tied to any game with a res higher than about 240p or so. It’s those higher res games that have the really annoying super flicker in addition to poor FPS while the 240p and under games look fine.

1 Like

Starting from yesterday, the development repo (and next official release) requires Retroarch to be at least at version 1.16, because koko-aio is using some features not available before.

Older retroarch versions will simply refuse to load the shader.

1 Like

To overcome slowness when applying the shader to hires content like flycast core that outputs at 640x480, I made a copy of the presets that works with halved internal resolution.
(unfortunately retroarch won’t allow to do that runtime, hence the need of duping)

For my simpler managment, the new directory structure will be:

koko-aio
       L Presets_Handhelds-ng
                            L [..]
       L Presets-4.1
                   L [..]*1
       L Presets-ng
                   L [..]*2
       L Presets_Halfres
                       L Presets-4.1
                                   L [..]*1
                       L Presets-ng
                                   L [..]*2

So, Presets_Halfres is the new folder and will contain Presets-4.1 and Presets-ng which, in turn will contain exactly the same presets found in the other Presets-4.1 and Presets-ng folders.

This would allow to run Hires 60hz games at the same speed (IGPs) of lowres one and with the same quality.

I’m here for an advice for a descriptive name for the new folder.
I don’t think Presets_Halfres is enough to describe the intent of running hires games at the same gpu use/speed of low resolution one.

So, do you have any advice? i’m considering:

  • Presets_HiresCore_HalfResGPU
  • Presets_HiresCoresOptimized
  • Presets_OptimizedForHiresCores
  • Presets_HiResOptimized
  • Presets_HiRes_Perf
  • Presets_FastHiRes
  • Presets_HiResPerformance
  • Presets_HiResLowGPU
  • Presets_HiResSpeed
  • Presets_HiResAccel
  • Presets_HiresCores_Fast
  • Anything else!

Thanks :slight_smile:

2 Likes

I think this is the most accurately descriptive of the bunch.

2 Likes

I’m new to a lot of this, but what are you recommending to someone like myself focused on arcade/mame? It’s not necessarily a hires core, it’s a hires game. And what do you consider hires for an old i5 iGPU - for me I guess it’s roms running > 240p.

Like we dicussed on Discord, I ended up getting the performance I wanted for the > 240p games by dropping scale from 2.0 to 1.0 and setting as many params as I could in config-user.

On the flip side, on my non-VRR monitor, I still got crazy jitter for games like Arch Rivals that run at 512x480@30 Hz. I ended up hacking together something from Duglim’s N100 Batocera presets to solve that.

Hires is a vague term indeed; i’d say an ideal square of at least 400x400px.

As per the recommendation, I’m not sure I’ve got it. What’s the question?

So for mame core, use the standard presets for under 400x400 roms and these new hires ones for 400x400 and over roms?

1 Like

Prefer the standard ones if your system can handle them, revert to new halfres presets when it struggles, by keeping in mind that halfres presets quality depends on the core resolution.

That’s the rule.

I think I’ll pick the suggested name of Presets_HiresCores_Fast and will update the dev repo later, today.

2 Likes

At the risk of not really understanding the big picture with RA and cores, I’d suggest swapping “cores” with “content” in the naming convention because if you’re a newb like me, you’d think it’s one-preset-fits-all for a core and that’s not always the case.

1 Like

Lol, Agreed! Indeed I just pushed just before reading your message.
I decided to go for Presets_HiresGames_Fast.

Also added a short readme.txt in that folder eaplaining as follows:

These presets match the upper folder’s options, but without internal upscaling.
This lowers GPU load and maintains similar quality,
assuming the game’s native resolution is sufficient.

2 Likes

Tried the new hires Monitor-Bloom preset on the 4200M Windows machine - FPS is solid at 60FPS on CSPRINT, but still getting major jitter. Again, not sure what I’m doing and maybe this piece isn’t relevant, but here’s what my flicker pass looks like in the stuff I hacked together yesterday, under which I don’t get any jitter:

       shader1 = shaders-ng/flick_and_noise.slang
        alias1 = "flick_and_noise_pass"
filter_linear1 = false
   scale_type1 = source
      scale_x1 = 1.0
      scale_y1 = 1.0  
    wrap_mode1 = "mirrored_repeat"

That’s right, it is scaling at 1x, it resambles what has been pushed to the dev repo today.

How would I have been able to eliminate the jitter using the version I created…probably something defined in config-user.txt?

Maybe lower flicker power if I understood properly. -edit- Or just turn interlacing emulation off, set the following to 0. Screenshot_20240614_170856

1 Like

Hi, is there any chance for a new handheld psp preset? :slight_smile:

I think GBA one can be used for Psp as well, provided one swaps the background picture.

It is just a matter of finding a licensed realistic picture.

3 Likes

It was not just a matter of finding the picture :slight_smile:

Indeed, I’ve faced several stoppers, finding the picture was easy, since there is a free CC licensed one in svg format from Tokyoship.

  1. koko-aio was unable to scale bg picture and content in a uniform manner when the picture was offsetted, that has been fixed in the dev repo.
  2. psp core can upscale the content, so i reverted to screen space rgb mask, instead of a core-resolution space one.
  3. How bad is psp core on retroarch?
    Slow like a crawl, ppsspp on my phone is faster(!) Also unstable: tried Gods of war: freeze, tried out run coast to coast: freeze

Btw Juiced 2 works:

Core set to 2x scaling: PSP.slangp

Core set to 2x scaling: PSP-Overlay-Night-Small.slangp

Core set to 1x scaling: PSP-Overlay-Night-Small.slangp

Core set to 2x scaling: PSP-Overlay-Night-Big.slangp

…is there some special recipe to make PSP Core to work reliably, I’m feeling like i’ve wasted time.

4 Likes