Koko-aio shader discussions and updates

New 1.9.63 release is up on github and should be available soon via online update.

It you do online update, please clean the koko-aio presets-ng folder, as some bad presets were removed and other were moved to subdirectories; if you don’t clean up prior to upgrade, you’ll have duplicate presets and basically a mess, because retroarch online update doesn’t handle deletion by itself.

Changelog:

  • NEW: Support optional include files, so config-user-optional.txt deprecates config-user.txt
  • NEW: Support for Core aspect ratio on RetroArch > 1.19.1
  • NEW: Allow to tweak Bezel inner shadows
  • NEW: Add “clip to white” parameter (mainly useful to emulate neon lights)
  • NEW: Spot and bezel shades, handle 180deg. rotation.
  • NEW: Add 2 Vector GFX presets
  • NEW: Add wwx mask.
  • NEW: Skip rendering initial bogus frames which have 1x1 Framebuffer size.
  • NEW: Workaround for Bloom and Ambientlight glitches on vulkan when using Fast Forward and other cases.
  • NEW: Add specific Megadrive Fake transparency handling and updated relative presets
  • NEW: Bloom: better track small bright areas
  • NEW: Static Conditional FPS halver (30->30, 60->30, 25->25, 50->25)
  • CHANGE Better near-edge defocus function
  • CHANGE: Reorganized preset directory, please clean your preset folder prior to doing a Retroarch “Live” update.
  • CHANGE: Better (and faster) spot blend function
  • CHANGE: OverHauled Gamegear and GBA presets to be more accurate
  • CHANGE: Optimized tilt functin
  • CHANGE: D3D_WORKAROUND has been moved to config-user-optional.txt
  • CHANGE: Presets tweaking
  • CHANGE: Docs updates
  • FIX: Delta Render: Avoid glitching near frame border.
  • FIX: Raise some jpg black level to workaround android jpg loading bug.
  • FIX: Specularity over bezel darkened it in some circumstances, fixed
  • FIX: Handle all rotation stares for Back/foreground images.
  • FIX: Fix a long standing bug where bloom were using the “inverse” configured temperature, it looks better now.
15 Likes

It seems the D3D workaround is broken, I used the new config-user-optional.txt and it gives this:

1 Like

Definitely broken, will release an hotfix soon!

-edit-

just done.

2 Likes

Good day!

Prior to the 1.9.63 release, I had configured a few hundred bezels w/overlays. At that time, the aspect ratio numerator and denominator where effectively disabled – presumably because at that time, the feature was tied to ambient light or background image, which for me were both disabled.

Now with 1.9.63, I can’t seem to disable the aspect ratio feature and it’s affecting the bezel positioning for each of my customized video scale games. It looks like the logic for Aspect Ratio was modified as the Libretro shader option now shows “applies to game and bezel”. Selecting -2 for the numerator (PAL) gets close to my settings, but still isn’t accurate.

Instead of having to hand-modify roughly 600 custom settings, was wondering if there is a way to disable the Aspect Ratio feature. I couldn’t figure out a way to do this via the shader params nor the Koko-aio config txt files.

Thank you, and cheers!

1 Like

Hi there!

Indeed, previously, when not using Ambientlight or fg/bg images, the bezel and the content were stretched to the output framebuffer size, where now they retain the configured Aspect.

If you want the old behaviour, assuming your final framebuffer size/aspect is static, you should configure it as a fraction of aspect nominator/aspect denominator.

So don’t use a -2 Pal preset, but find a ratio that perfectly matches your display, instead.

Once you find it, you can then “fix” it into every preset by either referencing a common base preset (if you hopefully organized those 600 ones that way), or by fix those parameters into config/config-user-optional.txt, but that would affect every koko aio preset.

The other way is to edit every single preset, manually, or with some kind of search/replace script.

…That behaviour lingered long time before the release, and didn’t known it could be an issue, but indeed I can imagine your use case.

I can insert another aspect ratio preset that would replicate the old behaviour by matching the final framebuffer aspect in a future release, but meantime previous described methods apply; let me know how it goes!

1 Like

Understood and somewhat expected. Thank you!

While I won’t bank on a new A/R preset, I do recommend adding it, and maybe even considering it default.

A little backstory – In my exercise, I’ve been replacing shaders that were combined with arcade overlays from OrionsAngel – and the screen aspect ratios are kind of all over the place. For what it’s worth, he uses HyperSpaceMadness Mega Bezel, but I needed something different…

I’m actually using a Raspberry Pi 5 and HSM simply doesn’t perform. So I’ve been meticulously replacing GL shaders for koko/slang and optimized the heck out of everything with really good results. Pixel perfect.

Using the frame buffer A/R has been very intuitive. l through this process – and I’m about 70% through the conversions.

For now, probably best I revert to your previous koko shader version and finish my exercise. If it comes to pass that a frame buffer related setting is added, I can upgrade and everything should work well. Otherwise, I’ll decide how to handle at a future date.

Big fan of this project… Really amazing results with this shader for a crazy number of video games in my collection. Again, cheers!

Adding a new AR preset is certainly doable without much problems, will do later today with something like “-1:not set.”

I’m not sure why you think it should be the default; previous behaviour was somehow inconsistent, because the AR changed depending on the use of other border options.

I have a belief, and it might be faulty logic on my part, that for comprehension AR should remain somewhat invisible, static and overridden if a user wants to. Most shaders don’t have an aspect ratio feature, so it feels very new that it’s something to pay attention to since RetroArch already allows for Aspect Ratio (for screen) vs. an Aspect Ratio for shader. The feature makes sense for bezel tech though. I understand that my project may differ then probably most here. So for me, the way it “feels” now is that I have to make a somewhat arbitrary decision, when a single overlay may support multiple games that might use PAL or NTSC, or MAME, or Final Burn Neo. So instead of using a preset, need to play with a numerator and denominator per game, and that might bite me in the future. With a new setting, I’ll probably lock to that setting and never change it, so your solution would work great! But I suspect as koko-aio gets more popular and widely known, it will become a more common question people will have.

Thinking, I keep wanting to change a 1.0 to 0.0 Aspect Ratio setting for Aspect Ratio and by default have it “turned off” (0.0) or better said, use the frame buffer – or “turned on” (1.0) for new presets or manual numerator/denominator settings.

Again, just thoughts here. The shader is already one of the most advanced out there.

Some info.

With the MODE command you get a beautiful 640x480.
mode con lines=60

MODE_104-250218-023623

DOSBox doesn’t have MODE, but you can use the FreeDOS one. MODE_104

The downside. The other adapters cannot display 640x480.
On VGA, it is possible but I think it is not possible or I don’t know how to do it, although there are 640x480 applications.
The above (ega, cga, hercules, mda) do not support 480 but there are registry fixes that allow 640x480.

Sorry I don’t write it directly, for some inexplicable reason I can’t write there.

1 Like

I just made 1.9.63-HotFix2 Release. It includes what you are after:

So, just select -9 as Aspect Ratio Numerator, and the content and the bezel will stretch to window size.

Give some time for it to be available via Online Updater!

3 Likes

Stoked! The change is really appreciated. Will give it a run soon.

Thank you for the update and for this kick-ass shader!

Give some time for it to be available via Online Updater! I couldn’t wait :slight_smile:

Just a heads-up that it seems the new option doesn’t seem to replicate the previous behavior. Below, note the top capture is from Koko-aio 1.9.50 without Ambientlight or fg/bg images – and the bottom image is using 1.9.63-HotFix2 Release with otherwise identical parameters. Changing the numerator for the new preset (-9), it looks like the horizontal matches correctly, but the vertical is off. Note that each are also using identical RetroArch values for scaling:

custom_viewport_x = "556"
custom_viewport_y = "56"
custom_viewport_width = "805"
custom_viewport_height = "1005"

I hope these examples are helpful to the effort. I appreciate trying to replicate the old behavior.

Best! -Ros

I’m unable to replicate the problem.

Are you sure no config-user/optional.txt overrides are in use?

This is what I get with 1.9.50 without Ambient lights and without bg/fg image:

This is with 1.9.62 and the AR parameter set to -9

If there is something else going on, I think you have to post the whole retroarch.cfg file, and a sample preset that exposes the issue, maybe they would help.

Also, what Retroarch version are you on?

I’m using RetroPie, which is currently using 1.19.1, Not yet supporting 1.20.x so I’m abiding by the instructions found in koko-aio’s config-user.txt file. I’ll keep researching, but I suspect I’ll come up empty.

Looking at your screenshots, are you using “Full”? Wondering because that’s a funky-looking aspect ratio for a vertical game.

For me, for all games that I’m customizing, I’m using “Custom” (23) and manually adjust via the four (4) “Custom Aspect Ratio” settings (X,Y, Width and Height). This is typical for other non-bezel shaders.

So, for my Pac-Man example above, I’m using:

aspect_ratio_index = 23
custom_viewport_x = "556"
custom_viewport_y = "56"
custom_viewport_width = "805"
custom_viewport_height = "1005"

I’ve posted the Pac-Man overlay I’m using here.

For koko-aio, I’m using Frame Alignment 0.18 for all games and a Global shift/zoom value of 0.83 for all games.

I hope this is helpful, but I’ll keep looking into things on my end.

Forgive that my posts are in “Awaiting Approval” jail because I’m a new user in this forum.

Okay, I found something. I was able to build RetroArch 1.20.0, zero-out their new “Viewport Anchor Bias” X/Y and the aspect ratio works correctly with your newer shader with the -9 value set. It only doesn’t work with 1.19.x.

This is good news. Your new addition definitely works for the latest RetroArch.

I’ll see if the RetroPie crew would be interested in supporting the updated version of RetroArch.

Thanks again @kokoko3k!

1 Like

Nope wait, I think there’s a bug in the code. I’ll pm you tomorrow after the fix for you to try and report back without delay :wink:

1 Like

I think i found a way draw full slotmasks at 1080p without weird patterns, dark on purpose:

I need to optimize the method, but It is able to clear this mess:

5 Likes

Zdravim vas mohu poprosit o radu?Vetsina predvoleb mi dela to ze obraz prede mnou ma velike spozdeni.Obraz prede mnou se vzdy objevuje az o kousek pozdeji.Nevim cim to je jestli nastavenim?ci low hardware?

Please tell me more about your system (hardware, software, operating system)?

It would be best in english!

Intel® Core™ i5-6400 CPU @ 2.70GHz 2.70 GHz,Nvidia GTX970,RAM 16GB,win 10