Koko-aio shader discussions and updates

Odd, the dev ones arent working at all for me…I load the present as normal (as per your 3.4 pack) and it shows no shaders in the passes.

Thank you. It would be really cool if we could have a sort of a template koko shader, that only contains outer appearance related passes like bezel, LEDs, background, spot, any scaling configs, etc. And doesn’t include the passes that alter the image like scanlines, blooming, etc.

The reason is so we can combine your shader with other shaders at a less performance cost.

Crt-guest-fast + koko’s bezel would be a dream for me. And it is already possible to stack shaders in the latest RetroArch nightly build through the new Append/Prepend feature. I tried it but the performance cost was high, so please make a lite trimmed version of koko aio. It might help alot.

It ok, fixed it. The error occurred when just copying over the files.

Thanks again for your work.

1 Like

Mantain two versions in sync with changes is out of the scope, but It should be possible to just prepend the shaders you need before everything and then disabling the features you don’t want/need and optionally set the scale parameter of the first pass that scales to 2x to 1x (now “first_pass”) and the first that scales to 0.5x to 1x (now “avglum_pass”) as well.

5 Likes

How can I move bezel and image positions to fit inside this portrait overlay:

Unfortunately you cannot move the content image, but only zoom it, so I fear you have to play with the background image that you can move and zoom). We’ll see if in a future release ll’ manage to move the content too.

1 Like

I know this is off topic in the sense that it’s not Koko specific, but I thought I’d ask…

I decided to give your suggestion to Starman99x a try and inserted universal shader as first pass, then changed the scales on both first_pass and avglum_pass - but the result is…well, let me show you:

Original (Universal)

Universal and then Koko

This also happened when I attempted EasyCrt as first pass - scanlines etc are enlarged and resolution is low.

(I should mention this is with all features of KoKo disabled internally to eliminate any complications)

Any ideas?

1 Like

Nope, sorry about that. As I said, code is very tight and difficult to adapt to foreign shaders.

I can suggest you to tune existing koko-aio settings to your likings, instead

1 Like

Done sir, you’ve to grab the latest dev code on github as explained in the very first post.

1 Like

Wow that was fast! thank you, I tried it and it works great.

Btw, there’s a problem I noticed not just in your shader but with scanlines shaders in general, and it’s that the smaller you make the image the more warped and wavy the mask becomes, and other distortions. Not sure what to do about it.

Anyways your shader is awesome keep up the good work.

The only features I’m missing from crt-guest and preventing me from making koko aio my be-all end-all shader are:

  • LUT colors

  • Hum bar

  • Noise filter

  • less gpu usage but that’s understandable

  • The way guest deals with bloom in general by giving sprites this visible glowing aura around them, especially in dark scenes, makes dark games like Metroid look really cool. I think your shader is close but I couldn’t replicate the effect exactly.

  • I’m also missing a more simplified and straightforward scanline tweaking experience, so I could make them thicker/thiner more easily and switch between preconfigured slot mask/aperture grill presets inside the parameter settings.

Maybe koko aio has more than I think but it’s just not so straightforward, or I’m just dumb.

There is really (almost) nothing to do about weavy effect you have when scaling down scanlines.
It is already an achivement to have a scanlined 240p screen to look solid on 1080p.
Your only option is to lower the scanline effect by highering the “Gap brightness”, and probably getting rid of the curvature too, not sure about that.

I fired up crt-guest just now to look at the settings you’re missing, and it seems to me that LUT colors are shortcuts to modify the color temperature, but i could be wrong, so check by yourself by modifying: “Temperature in (6500=off)” parameter.

Hum bar and noise aren’t something i want, i’d like to replicate things that made the picture look better, not worse (yes, yes, i like curvature).

I’m spending lot of time trying to squeeze performance here and there, and honestly i’m running out of rabbits from my hat.
Since you mentioned it, it seems crt-guest-fastest is really fast; but crt-guest-fast one has worse fps than koko-aio, at least on my system.

Bloom is very configurable; i think the “Aura” effect is not really accurate, but if you see through koko-aio parameters, there is “strength on bright areas (0=aura)”, which whould help; i also suggest you to use the bloom “bypass” function, which lets you see only the bloom effect; it makes easier to tune it.
Btw, what you want is to lower the bloom “Output Gamma” parameter and probably zeroing “strength on bright areas”:

Other than that, keep tweaking.

There are a lot of knobs and i know it is not easy to master the whole thing.

Keep a look to docs.md or just ask here for more clarifications :slight_smile:

2 Likes

The smaller you make the image, the less effective pixels you have to render the image so you might need to switch to a different mask pattern that works better at lower resolutions so on a 4K Screen you might be able to use RRGGBBX as you go down in viewport size (and effective resolution you might need to switch over to an RGBX or RGB mask).

Another way to put it is as resolution effective resolution decreases, increase your TVL and you’ll see less of an issue with moire patterns.

At least that’s what works for me.

2 Likes

Excuse my ignorance, what does TVL stand for?

1 Like

No problem. It’s a new term to me as well.

It stands for Television Lines and is a measure of the resolution of the TV.

https://www.imatest.com/2021/11/how-to-compute-resolution-in-tv-lines-tvl/

https://elinetechnology.com/definition/tvl-tv-lines/

1 Like

Oh, yes, I understood that, but i thought it was an advice for Starman99x about something that could be done in a shader.

I guess i misinterpreted your answer to him.

1 Like

This is correct, I was giving Starman99x advice about something that could be done in a shader to reduce moire patterns. Finer (higher) TVL Mask patterns tend to suffer from less moire artifacts as viewport size decreases.

I was listing the subpixel layouts of different TVL RGB Masks.

See here for some more info:

Mask 12 in the post below below corresponds to Mask 13 in the above post.

1 Like

In my shader (and i think in others too) the vertical rgb or green magenta masks are always straight and relative to output display, so they don’t scale and do not produce moiree, ever.

Problems could raise when dealing with slotmask versus scanlines and since v3.5, I deal with them by default by syncronizing the slotmask height to the scanline height.
That way they are far more robust and resist to moiree for extreme curvature and dark gaps, at least at reasonable output resolutions; this is input 240p, output 1080p:

That way they curve and scales alongside the scanline.

…but when dealing with the weavy effect that results from the (down)scaling of the scanline itself that happens when the input picture itself is downscaled, no choice of mask could help, unfortunately, and the only workaround I see is lowering the scanline effect itself by making the scanline dark gaps less dark.

6 Likes

Great work on these shaders! I turned my old rig into an emulating machine and for the longest time I struggled to find a bezel/reflection shader that would both look good and run well on a 1080p display. Even the basic Mega Bezel presets would stutter. But these are perfect and work without having to tweak any of the parameters. Using them on all my cores (NES, SNES, N64 and PS1). PS1 games in particular look a lot better. Keep it up!

3 Likes

I made these TV overlays (using exodus crt as a base) for koko-aio shader, you can call it the first “RGB CRT” lol. I’ll share them in a post later with their own presets for ease of use:

And yes, that’s how koko’s scanlines look on my 1366x768p display, and upon further inspection this problem isn’t prevalent in crt-guest (or some of it’s scanline types and options) among others, unless I made the window really small. While koko looks wavy even ony my other 1400x900p display, I guess I really need a 1080p screen for koko, that’s too sad.

3 Likes

Ahah!

Nice exploiting of Ambient leds :slight_smile:

As said, the more scanlines are visible, the more their drawback sat lower resolutions will be evident. Probably the great shader from guest.r has their default values tuned for smoother and so nicer look at lower resolutions.

What you can do/try is to tune:

  • Scanline Gap brightness (make it higher)
  • Halo -> Light up scanlines too (it is a typo, it means “scanlines gap”, make it higher)

Btw, are you using a preset done by you or one from the default preset list?

…look i opened a standard preset from 3.5 and scaled down the window to a dimension close to yours (even lower):

…yes there is moiree, but far less than in your screenshot; also it seems to me that the mask in yur preset differs from mine, so i ask you again: are you using a preset from the latest stable version?

Check that “darklines strength” is 0 and that you are using A “slotmask type > 0.0” (under scanline section), because here lies the code that syncs the slotmask height to the scanline one and that hopefully will help you.

–EDIT– In fact, your content resolution is actually lower than 768p, because you are drawing a the bezel border too.

1 Like