Koko-aio shader discussions and updates

Isn’t there be a way to expose a parameter to toggle the wrap mode. If this is something people would be wanting to do often?

@Duimon

I added it in the past in koko-aio, but then turned it to statically switchable only, by uncommenting a line, to cut some complexity from the shader, because I was sure that it could be easilly modified in the .slangp with wrap_mode parameter.

It turned out I was wrong, so the next thing i wanna try is to not specify any default wrap mode in the main preset and see if retroarch would pick the one from a descendant preset; that way no overriding “should” take place, but I’m not sure it would work.

Then I will think again to the possibility of re-add the lost functionality.

1 Like

Unfortunately this is not going to work. In the load process of the simple presets (which I wrote), it only sees #reference lines, parameter values and texture paths, everything else is ignored.

2 Likes

The new Nightify option is ridiculously impressive if you combine it with Ambient LEDs - see 1942 and 1943 below (as always, the screenshot cannot give the effect full credit).

Question: Is there a technical reason why both Nightify and LED colorization only apply to bg_over, but not bg_under? I can handle it this, but some bg_under artwork would also benefit.

Funny enough, I also did the first two artwork on the fabulous artwork compilation by Mr. Retrolust, who are all nightyfied - here the Ambient LEDs also play out nicely:

4 Likes

Oh! it really looks good.

The fun fact is that it started by pure case when @Starman99x asked to paint ambient light over the image, then it has been a sequence of “Wow, it makes sense, but since I’ve done this, why not that?”. (read: it was completely not planned lol).

I didn’t even checked the code well (on holiday right now), and speaking of that, did it work for ‘under’ images too or you adapted the artwork to be image over?

edit

Oh I see you asked that: no.

No reason that i can think for not implement it for bg under if not the rush before easter holiday; will add to under images too.

3 Likes

@HyperspaceMadness Speaking of the amazing MAME bezels by Mr. RetroLust, it would be even more amazing if someone made a tool that can magically convert MAME .lay files into slang shaders, since RetroArch dropped support for Video Layouts as of the latest release.

Now that certainly does sound like magic!

I honestly think the complexity of that would be kind of a nightmare, and we’re likely better off going the direction of leveraging koko-aio or the Mega Bezel for these needs.

Some sort of converter to convert a mame basic layout to a koko-aio or mega bezel preset could be useful but also limited.

You could perhaps support conversion of 1bg image, 1 backdrop image, and placement/size of the screen.

8 Likes

Just finished to add it to bg_under alongside other small tweaks. The glow you see over the bezel outer border is intended and twaekable by the “Colorization size” parameter under ambient light group.

3 Likes

I feel dumb for not realizing that I can override custom overlays as bg_under instead of bg_over, this would let me use koko-aio with any mega bezel pack properly, since the bezel will be drawn over the textures:

This also solves any annoying mat fringing.

5 Likes

Many thanks, indeed! Colorization size has already become a good friend of mine :wink: … and I do read your excellent docs!

1 Like

Can you please teach me how to do this : p?

I want to use the Mega Bezel presets, but at the same time I want the bezels and the surrounding backgrounds themselves to look like Koko’s. I’m pretty green at this but I know how to increase the numbers at Shader Parameters : D

1 Like

Since you’ll need to mess with .slangp files using a text editor, I recommend Notepad++.

  • Start by loading one of the default koko-aio presets located in shaders_slang/bezel/koko-aio.

  • Adjust parameters to your liking, but make sure that “background image” is enabled and that “image over content” is disabled (you’ll need the bezel enabled too, obviously).

  • Now go back, choose save shader, make sure simple presets is on, then save shader as “name of your choice”.

  • Now in your file explorer, navigate to RetroArch/shaders and open your newly created shader preset.slangp with Notepad++.

  • Here we want to override the default bg_under without deleting or replacing it, so at the bottom type the following:

bg_under = “path/to/your_custom_image.png”

Choosing the path and filename accordingly. Note that this method is most useful with those solid background overlays that have no hole in the middle.

While some other overlays won’t look right this way, and require to be used as bg_over instead, in that case you’ll simply need to use bg_over = instead of bg_under = and you’ll need to enable bg over content (BG_IMAGE_OVER = “1.0”).

2 Likes

Thank you so much this was very informative and simple to follow. I highly appreciate it brother :clap:

1 Like

@kokoko3k I just found out that this method doesn’t work with vertical FBNeo games, I get this result:

These are the overrides I used:

#reference "…/…/Arcade_(Main).slangp" BEZEL_R = "-0.420000" BEZEL_G = "-0.400000" BEZEL_B = "-0.300000" BEZEL_CON = "0.950000" BG_IMAGE_OVER = "0.000000" DO_AMBILIGHT = "0.000000" DO_GLOBAL_SHZO = "1.000000" GLOBAL_ZOOM = "1.005500" BG_IMAGE_WRAP_MODE = "1.0" bg_under_wrap_mode = "clamp_to_border" bg_under = "…/…/textures/Arcade_Vertical_A1.png"

Disabling both wrap mode overrides gives this result instead:

This issue doesn’t affect the bg_over method:

Works like a charm for background artwork as well. I seriously consider reworking all presets to Nightify & LEDs, as the effect plays out so nicely…many thanks!

1 Like

@Starman99x - do you use the latest code from GitHub? That issue has been fxed recently, works for me …

1 Like

Oh I see, no, I only use the latest RA updater version. I wonder when this fix will be pushed to RA updater, since I’m almost done with the @soqueroeu pack.

Asap, I promise :grinning:

Meanwile, it would be great if you could test the latest code too to check everything works as expected for you.

1 Like

I’ve just uploaded 4.0 to github (see main post for links) and it is in the process of being reviewed and hopefully merged soon upstream to be updated right in retroarch.
Main post updated with changes over 3.9, have fun!

-EDIT

At the time, of integer scaling inclusion, i forgot to present you it in combination with the new feature to skip drawing any rgb mask and just drawing the “gaps”.
This made possible to achieve sharper visuals, probably useful for emulating flat lcd handheld screens like gamegear, altough the vertical gaps should align to content pixels and they don’t right now. (set browser zoom to 100%)

9 Likes

I stumbled upon this same mask a while back. It’s surprising how well it works at couch mode distances, but lacks subtlety up close. It’s a decent option for 1080p.

2 Likes