Koko-aio shader discussions and updates

Be my guest, sure :blush:

1 Like

Thank you m8 all sorted :muscle::muscle::muscle:

1 Like

I feel like both uborder and koko have their charm… what I’m currently enjoying on koko is the slight breathing and the the slight flickering. And obviously the shader image quality :+1:

1 Like

Since I was experimenting with wide/ halation like bloom settings, I felt the need to have something that would allow me to make the bloom visible without having it clipping.

So there is now a new parameter:

By using a a soft Roll-off curve, this causes the darker to mid bloom shades to be more visible and pronounced, while rolling off the intensity of the brightest areas.

Caution has to be used for values > 1.0, because mid bloom tones will becomes brighter than bright ones, which can or not be something you want.

Depending on the parameters, there are various use cases.

Make the image more ā€œvibrantā€

off:
:

on: 2.0

Make it breathe (on:10.0):

And more generally, allowing it to bloom without making you blind, see how the white parts of the suit stay bright but don’t ā€œoverbloomā€:

off, high gain:

on: 10.0, low gain:

8 Likes

Hi kokoko3k - Using your work a lot has brought back several memories, and being European like you, starting out with the legendary PlayStation as my first console, I mainly used the RGB scart cable. I didn’t have one right away though; I had to wait a while to understand it existed and get it, so I used s-video cables. Given the particularity of s-video in managing colors and the associated bleeding, is there a possibility of emulating it as closely as possible with your work, or will there be a specific feature in the future, as you did with the NTSC format? Also because I believe your main shaders (I use monitors hmask, slotmask, and Shadow Mask) emulate RGB colors. Thanks so much for your attention.

1 Like

I’m not that deep into the technical details of NTSC or S-Video signals. I usually stop coding when my eyes tell me to/when what I see looks ā€œgood enoughā€Ā® . So while my NTSC implementation might look fine to an untrained eye and may bring back some good memories, it’s definitely not analytically perfect.

The same goes for S-Video, though in this case my memory and a bit of technical knowledge help me a little more.

The preset named ā€œTV-PAL my oldā€ is meant to recreate how I remember my old, cheap consumer TV …though that one was connected via composite, not S-Video.

As far as I know, S-Video carries luminance and chrominance through separate cables, so they don’t interfere with each other as they do in CVBS. However, both still operate within limited bandwidth.

That means luminance should appear cleaner and sharper than with composite (though not as sharp as RGB due to bandwidth limits), with no crosstalk — but the same kind of color bleeding can still be seen because of that limited bandwidth.

Vertical and overral sharpness depends on the CRT screen itself, but assuming you were using a common model, maybe blurring the image, adding a bit of noise and activating the CVBS color bleed feature should be enough (?)

What about this? it is probably on the low quality side (on purpose to show the effect of the parameters), so you may want to tweak it.

It is a slotmask with high scanlines, low saturation, some noise, color bleeding, a bit of blur on x and y and PAL chroma bleeding.

Rest is the base.slangp reference preset.

If you want to tune to your likings, i think the main parameters to be used which relates to Svideo are Colo Corrections: saturation, RF Noise, Glow/Blur: Sharp X/Y, CVBS Bandwidth: Strength and Falloff

Put this in the same folder as Presets-ng/Base.slangp:

#reference "Base.slangp"
IN_GLOW_GAMMA = "2.220000"
IN_GLOW_POWER = "2.999999"
LUMINANCE = "0.000000"
SATURATION = "0.9"

DO_SAT_BLEED = "1.000000"
SAT_BLEED_PAL = "1.000000"
SAT_BLEED_STRENGTH = "0.60000"
SAT_BLEED_FALLOFF = "1.470000"

DO_SHIFT_RGB = "0.000000"

DO_RF_NOISE = "1.000000"
RF_NOISE_STRENGTH = "0.140000"
RF_NOISE_SPARK = "0.080000"

IN_GLOW_H = "-0.850000"
IN_GLOW_WARPSHARP_X = "0.500000"
IN_GLOW_WARPSHARP_Y = "0.500000"

PIXELGRID_MIN_H = "0.650000"
PIXELGRID_MAX_H = "1.000000"
PIXELGRID_GAMMA_H = "3.600001"

PIXELGRID_H_PRST = "5.000000"

PIXELGRID_Y_MASK = "0.400000"
PIXELGRID_Y_MASK_COORDS = "1.000000"
PIXELGRID_Y_MASK_HEIGHT = "0.500000"
PIXELGRID_Y_MASK_OFFSET_DEHIVE = "0.260000"
PIXELGRID_Y_MASK_SHIFT = "-0.010000"
PIXELGRID_Y_MASK_ON_WHITE = "0.999999"
PIXELGRID_Y_SPARK = "0.000000"
3 Likes

From the screen it looks really good - I’ll load it up tonight or tomorrow at the latest and start using it, maybe with some Super Nintendo or Sega Mega Drive games - thank you so much!

2 Likes

There are so many presets, I don’t know which one to choose lol. What is your favourite preset for 8-bit and 16-bit consoles?

2 Likes

Eh, I know. as the shader code advances and gain new features, new presets are added to leverage them, but old ones usually stay there, because some users may got used to them, also, if I delete a preset, the online update won’t delete it.

My overrides are:

  • Megadrive: Presets-ng/TV/Tv-NTSC_Megadrive-AA_sharp-Selective.slangp
  • Snes: Presets-ng/Tv-NTSC_Generic-AA_sharp-Selective.slangp
  • C64, Amiga, Mastersystem: Presets-4.1/tv-PAL-my-old.slangp
  • NES: not playing it, but probably it would be: Presets-4.1/tv-NTSC-2.slangp
  • PSX: Depends on the game!
  • Handhelds: the ones under Presets_Handhelds-ng/ named as the console itself

Others:

  • Arcades: Presets-ng/Monitor-Screen_Hmask-Screen_SlotMask_Taller_Brighter.slangp
  • Dreamcast: Presets_HiresGames_Fast/Presets-ng/Monitor-New_slotmask_gm.slangp
  • MsDos: Presets-ng/VGA/Monitor-VGA-DoubleScan.slangp
6 Likes

Hello,

I just learned about this shader preset, and I’m very happy about it! I’ve set up quite a few Libretro emulators with Batocera, and everything works great!

On Gamecube, it works pretty well for most games, but I’m having trouble finding a good compromise for Zelda: Wind Waker. Could someone give me some advice on how to avoid flickering in the image? I don’t know exactly what setting is causing it… What allows me to no longer have this problem is to remove interlacing.

Thanks!

1 Like

Hi there, there are 2 settings named: Scanlines flicker and flicker power.

Have you tried them?

1 Like

Yes, I tried both and my game continue to flicker as hell. I think Wind Waker had an active in-game interlaced option

When I test Flicker power ON and OFF, same timing happen. If Scan lines flicker is OFF, again flickers as hell.

The other setting that may cause flicker from the shader is:

  • Hi-res scanline type

What if set to 1 or 2?

If this doesn’t fix the issue, then you can try to load the content without any shader and see if the problem comes from the core itself.

-EDIT-

I just tried ad disabling Flicker cuts the flicker by a good 90%. the rest is achieved through ā€œHi-res scanline typeā€ set to 1 or 2.

That said, the fact that disabling Flicker does not make any difference to you, makes me think you are not using the latest koko-aio version or maybe a modified version from a Batocera pack (?)

1 Like

If I set scanline type to 2, no flicker at all!

I downloaded the pack via Batocera, yes. How do I install the latest pack?

1 Like

I’m not 100% sure, but I think Batocera ships an old koko-aio version tuned by Duglim, which in turn leverages feature that lock some koko-aio settings to gain performance, and unfortunately there’s no user notification about that; so maybe the flicker parameter is indeed locked and always active.

This was done to allow even hires games to work at 60fps on weak igpu like the one in the n100, but today there are specific/unlocked presets made just for that.

To install an updated version, either use the online update from retroarch or download the development version from the github repo in the first post, but I’m not sure how Batocera handles that, so you’d better ask on its official support channels.

1 Like

On RetroArch via Batocera, I don’t have the option to update through the interface; I think that’s intentional…

1 Like

The shaders are on a locked path in Batocera. You can install the updated shader manually in the user drive and create a custom YML pointing to a new preset.

The easiest thing to do is copy an existing YML, use a mass rename tool to point the existing entries to the new path, then update whatever you want after. You then point to your custom named YML in the shader options.

There are a few people on the Batocera Discord that can steer you in the right direction. (Modhack, TVslan, getupor etc.)

2 Likes

Hi @kokoko3k I am currently setting up an M4 iPad Pro for RetroArch, and of course with koko-aio. As its format is (close to) 4:3, bezel artwork only makes sense in landscape mode, but not in portrait mode. My question: Would it be possible to set up koko-aio in a way that it only displays bezel artwork in landscape mode, but if I rotate the iPad to portrait mode, the bezel artwork is deactivated - so that the full monitor space is used? Just thinking out loudly…cheers!

1 Like

I remember i spent a lot of time coding this, (and with a lot of headache), to play gameboy on my phone in vertical mode :grinning:

The shader already prioritizes screen content on viewport resize.

As the available space shrinks in either dimension, it first cuts out the backgdound picture, then the monitor frame, and finally it will start to shrink the main content so that it will always be visible.

So my advice is to just try it out.

1 Like

Thanks for the advice, I just sent a message in the Discord!