Koko-aio shader discussions and updates

Quick preview of the new “Nightify” feature, experimental and prone to changes:

For now available when using image “over” content only, it darkens the image and the bezel in a realistic way, while leaving reflections at normal brightness.

This is controlled by the “Nightify image” parameter in background image parameters group.

A new parameter has also been added to the bezel parameters group named “Diffusion strength”, that lights the bezel reflective area in an uniform way.

This is the final result when modifying 1084s presets and combining Nightify = 0.8 + Diffusion strength = 0.5 + Ambient ight power = 7.0 and Ambient light falkoff = 0.3

7 Likes

That looks incredible, fantastic job!

2 Likes

Hi again, just to let you know that
bg_under_wrap_mode = “clamp_to_edge” and
bg_over_wrap_mode = “clamp_to_edge”
does not work in my individual presets (your Github version as of today).
While I can modify koko-aio.slangp in that regard (and it works, without the config.inc modifications), the same change in the individual game presets/core preset leads to no result. Any ideas? Cheers!

Nope, not now, it should work regardless of the code in the shader.

I’ll take a look as soon as possible, but it seems a like bug in retroarch or some weird thing in syntax handling going on, can’t say.

Could you post a ‘non working’ preset?

Let me summon preset master: @HyperspaceMadness

Any ideas?

Of course, here is a preset example, where “clamp to border” has no effect. I also did a test by directly referencing to koko.aio.slangp, but that also did not help.

preset starts (you apparently also need the artwork from my repository):

#reference “…/…/shaders/shaders_slang/bezel/koko-aio/monitor-slotmask-bloom-bezel.slangp”
LUMINANCE = “0.000000”
BEZEL_R = “-0.220000”
BEZEL_G = “-0.220000”
BEZEL_B = “-0.220000”
BEZEL_INNER_ZOOM = “-0.110000”
BEZEL_FRAME_ZOOM = “0.090000”
DO_BG_IMAGE = “1.000000”
BG_IMAGE_OFFX = “0.000500”
BG_IMAGE_OFFY = “0.009500”
BG_IMAGE_ZOOM = “0.999500”
BG_IMAGE_ROTATION = “1.000000”
DO_AMBILIGHT = “0.000000”
bg_under = “…/…/shaders/shaders_slang/bezel/koko-aio/textures/arcade_textures/1942.png”
bg_under_wrap_mode = “clamp_to_border”

It looks like you are adding this in your simple presets (simple presets being the ones where there are #reference lines)

This is why it does not work. Only shader parameter values and texture path values are supported to be overridden in simple presets.

2 Likes

Many thanks, understood! Then it’s the best solution to have this modification provided in the koko-aio main preset, which is a full preset. Good compromise!

Wops!
Sorry, i toke for granted that wrap modes could be overridden.

I cannot test right now, but maybe “NOT” specifying wrap mode in the main koko-aio.slangp could allow a simple preset to choose the desidered one?

In that case I could simply remove that directive.

Well, according to @HyperspaceMadness, you need a full preset to change the wrap mode. In that sense, your root preset is best suited! :grinning:

Possible alternative: I do a full preset for every Arcade core and reference to that one. But that deprives me of a every tuning of the presets you are doing, so these small changes in your root preset seem the right thing to do.

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