Koko-aio shader discussions and updates

I am really enjoying your shader presets. Forgive me if it is mentioned somewhere but I noticed that you have three preset categories which is 4.1, NG and handhelds. Handhelds are self explanatory but what is the main difference between 4.1 and NG and what does ng stand for?

1 Like

You’re welcome, it is a recurring question, maybe I should explain it somewhere in the docs :slight_smile:

3 Likes

Greetings @kokoko3k - I’m simply writing to thank you for your tireless work and for sharing all of this with us. Your presets “Monitor_FXAA”, “Monitor_Hmask_Overmasked” and "“TV_NTSC” with their variants are pure gold. Fantastic work. And the performance is always incredible, since you added dedithering it was just the icing on the cake. Thank you very much .

7 Likes

The monitor balanced preset in the ng preset pack is probably my favorite one. It has the look I am going for and looks like my crt I remember growing up and looks beautiful on my 4k oled.

1 Like

Missing feature I always forgot to add (and nobody asked!), but maybe one wants to sacrifice a bit of content screen in the name of integer scaling:

A parameter of 1.03 means you can bare 3% (sum of both sides) off-screen.

3 Likes

I’m sorry if this has been replied before, but I’ve read all thread and I couldn’t find it: Besides ambilight and CRT shaders setting, what’s the difference with HSM MegaBezel? To put it simple, if Koko-aio is able to run in 1080p with reflections, ambilight and CRT shaders, using less powered PCs than HSM MegaBezel, a simple YES would be a perfect answer to my question. Just to clarify: “less powered” means an integrated GPU of 4th Intel generation or newer, or maybe some AMD APU like A8 or A10. Ryzen 3/5 APUs is another league entirely


I’m not sure what is the question to answer “YES” or “NO” to is.

MegaBezel and koko-aio use a totally different code-base and I measured performances on the machine where develop koko-aio, an Intel¼ Coreℱ i5-4590 CPU @ 3.30GHz; on that hardware, presets reach about 90
100fps when running lowres content on a 1080p screen; this with GLCore, Vulkan on that machine is a bit less performant.

Thanks @kokoko3k, I just wanted not to bore you with a long reply. Anyway, it seems a big YES to me then! So, for a similar look in terms of bezel reflection, and CRT shaders (not ambilight), we can say koko-aio is “better” than HSM, or at least faster? BTW, looking at your name: Âżhablas español?

NOPE, test it/them and choose what is better for you!

BTW, I’m from italy, I honestly ignore what kokoko would mean in español :laughing:

Your are a humble person!!! :grin:

Koko sounds like “coco”, means coconut, at least in spanish.

I always think of CoCo from Foster’s Home for Imaginary Friends

1 Like

That’s something not seen in this region. If you are old enough like me, you can think also in the TRS-80 also called the CoCo computer:

TRS-80_Color_Computer_1_front_right

1 Like

BTW, @ArsInvictus was looking for a shader like HSM but able to run on older machines. Maybe you can contact him.

Update:

@estefan3112, @Starman99x

@LetramChi too (because of this

I modified the allowed parameter range for background/foreground image to allow mirroring too and basically every combination or rotation+mirroring, so the number of choices for it is now 9 (with -1 and 0 acting as previously did).

For performance reason, the Values that rotates the image by 90 and 270 changed index, so maybe you have to update your presets if you ever used rotation (I would do a little check even it not).

Secondary update is that the spot position now requires 2 parameters (x,y) (I ditched the scanning like unique parameter to have another spare vertex shader parameter to pass to the fragment one).

Bu it is not just bad news, all this has led to 2
4% performance increase on my rig when using background images and no overhead when not.

3 Likes

Which shader do you recommend for PSX? ,if I improve the core video to x4 it looks a bit strange.

tl:dr version:

  • Use anything you like on the in development code on github (link in the first post) or turn interlace handling scanline to “fake” instead of “faker” in the currently shipped retroarch koko-aio.

Long version:

Hard to tell without sceens!

Btw, when you push internal resolution to 4X, the shader thinks the image is interlaced and reacts to that according to some parameters.

Provided you are using the the latest dev one, the default settings in “★ Interlace Handling” section, force the use of integer “faker” scanlines:

Fake and Faker interlaced scanlines will be straight, no matter the curvature setting, and won’t follow the core resolution, but sets a number of scanlines that is as closer as possible to the core resolution and “integer fit” the screen.

This is needed to avoid waving and moire artifacts when the output resolution is not enough for full/proper scanline emulation and is not a big deal on interlaced content, since the interlacing process itself makes the disappear by quickly alternating them over time (unfortunately this wont work with proper scanlines, since artifacts won’t disappear, quite the opposite).

“Faker” setting, the default, pushes the limit to 1.5X and may still produce some artifacts in the koko-aio shipped with retroarch, particularly on *-Overmask.slangp presets.

Btw, the dev shader on github received some fixes and now looks good to me even with faker scanlines on steeper/overmasked presets.

This is an hard one: Monitor-Screen_Hmask-Aperturegrille-Overmask.slangp:

As said, In motion scanlines tend to disappear, provided your rig is able to keep the framerate high enough.

Another solution, depending on what you are after, is to skip scanline emulation entirely on interlaced screen:

(this will require highering output gamma or even lowering the main input gain):

1 Like

Hi Kokoko3k,

First of all, thank you for your shaders. I am reaching incredible results with them, much better that what I had before.

Currently I am in the process of porting all my arcade games to RetroArch/koko-aio, and I came across games that need the Backdrop feature. I think this feature could be improved a little bit to make life easier, so here I share my feedback:

  1. The backdrop image is not rotated properly for vertical games, like Space Invaders (Mame Current core). Maybe using the same rotation parameter than the Background/Foreground image would be a good idea.
  2. An option to Nightify the backdrop image would be great.

Please decide what would be best in your opinion.

Best regards

1 Like

Thanks!

I never put much attention to that feature; point is that you need to make a specific preset for every “backdropped” game anyway

If one considers that a shader does the same thing 60 times per second for every pixel in the screen for every game execution, then realizes that forcing the shader to process that in real time to have the same result everytime is kinda a waste of resource.

I mean, one could modify the backdrop image once for all prior of running it and make a specific preset for that specific game, where is the need to change parameters like image nightify or rotation in real time?

Am I overlooking something?

No you are not overlooking anything. BTW this is how I implemented my games, pre-baking orientation and nightification inside the PNG file.

For me it would seem to be more practical and flexible to do it at shader level, but it is not mandatory. If you think the performance aspect is prevailing, then I fully understand the reason.

1 Like

As you know some cores (and content) flips the bg_over.png in weird ways, and for my personal setup I solved this my flipping the overlay.png for let’s say SwanStation.slangp which contain overrides like this:

S_POSITION_Y = “-0.500000”

bg_over = “
/CRT_LIGHT_FLIP.png”

But for my arcade packs I prefer to solve this in koko-aio itself, unfortunately my fix stopped working in the latest (in dev) build:

And I tried all the rotate image values, but this is the most normal result I could get:

It’s flipped upside down, and the only workaround would be to flip the overlay.png, which sucks and would require duplicated textures.

Also the light spot kinda looks weird in this dev build.