Koko-aio shader discussions and updates

Weird, it seems it was an old bug in koko-aio, exposed just by that core with that options and in some games.

Good news is that I spotted and fixed it without issues; can you test the dev version?

1 Like

Hi there, I don’t think a new preset is needed, the existing ones aim to emulate just that, with interlacing and flickering.

First you won’t upscale from core.

If you want emulate good signal, check Presets-ng/Monitor-Screen_Hmask-Screen_Slotmask* presets.

(screenshot omitted because interlaced emulation content cannot be reproduced with a single frame)

Without visible scanlines, smoother, check: Presets-4.1/tv-slotmask* presets.

To emulate low quality TV/Signal, check Presets-4.1/tv-PAL-my-old.slangp

2 Likes

works fine

I tried all the presets and only one didn’t load, it seems the reference is missing image

2 Likes

Yeah, the reference was gone because it looked bad, will remove this one too :wink:

1 Like

Since new Retroarch is finally out, I’m going to release shortly the new version.

The reason I was waiting for it, is that there will be two changes unsupported before:

  1. For those of you that relied in config-user.txt, there will be no need to backup that file anymore, if not just one more time before the upgrade.
    Indeed it is now possible to tell retroarch shader system to ignore a file if it is not found and use if it is.
    By leveraging that, config-user.txt is now deprecated (albeit still used for retro compatibility).
    Instead, I encourage you to use config-user-optional.txt, it has the very same syntax, just different name.
    config-user-optional.txt will not be shipped by default, so it won’t get overwritten, but you’ll find “config-user-optional-template.txt”, which is supposed to be copied/renamed in its same directory to config-user-optional.txt
    I hope it is clear.
    config-user-optional.txt will contain the usual logic to turn dynamic parameters into static ones to gain performances, but it will also contain specific system configurations, which are supposed to be edited one time and shared by all of the presets:
  • #define D3D_WORKAROUND Used to make koko-aio working on D3D Drivers (Xbox)
  • #define LCD_ANTIGHOSTING Temporal sharpening to reduce ghosting induced by low pixel refresh
  • PIXELGRID_INTR_GAMMA_ADJ (for OLEDS) Disable gamma compensation needed by LCDs screens when dealing with interlaced emulation.

    Also, it will contain some static settings to gain performance or enable higher quality ( and more gpu demanding) renderings.
  1. Finally Retroarch release exports the Core reported Aspect Ratio to shaders!
    It is true that Koko-aio supported that since the feature was pushed to Retroarch dev repo, but I plan to make it the default for any preset not needed specific aspect ratio.
    This means that you will find the parameter: Aspect Ratio Numerator (<=0 for a preset) set by default to -7: Use Core Provided Aspect
    So multiple screen arcade games like Punch Out, Darius, Ninja Warriors, will not need you to manually figure and adjust the Aspect ratio.
    Not only that; if you enable Vice or PUae (or any other core supporting) autocrop, the shader will be able to automatically “zoom” the picture; for Amiga emulation this means Almost full screen gaming on 16:9 on a lot of titles.
    For Snes or Megadrive (or whatever), you’ll have to pay attention to the aspect ratio set by the core, because by experience they don’t always do a good job in that regard, set their core options to 4:3 to retain the previous behaviour.
8 Likes

I just pushed an experimental feature I’d like you to test. There were a previous static option LCD_ANTIGHOSTING which worked by temporal sharpening frames.
Now, not only it is applied to even frames only, but activating it will alternate the phosphor colors too.

For low to mid scrolling speeds, it seems to do a good job in mitigating motion blur due to sample and hold and low level lcd pixel refresh, screen will flicker abit.

To test:

  • download the latest dev version
  • copy config/config-user-optional-template.txt to config/config-user-optional.txt
  • edit config-user-optional.txt so that it starts like this:

#define LCD_ANTIGHOSTING 0.5


0.5 is the effect strength, i think it is a good start value. Then play some games that scrolls (aerofighters 2,3 are good candidates).

It should* work better with pure presets like Presets-ng/Monitor-for-HigherNits.slangp

Everytime you want to change that value, a shader reload is needed.

3 Likes

Everytime i want to release, i put myself on a new thing…

I’m trying to refactor the damn waterfall blending and selective blurring, I found a good combination of pattern matching and thresholds that should resample what happens on the real thing.

I’ve was lucky to find video on youtube by real hardware captured via a capture card: https://www.youtube.com/watch?v=YWy0888OFj4

And this is my attempt to recreate it with added rainbowing:

8 Likes

Looks pretty good to me.

2 Likes

Previous method didn’t worked well with Street of Rage 2; fortunately this one does the trick and seem to preserve more details (it’s also faster):

8 Likes

I just pushed that mod.

Since it touches multiple code paths, I ask anyone interested to spot any overlooked regression it may have introduced and report back,10x!

4 Likes

Ok, so the final version is hopefully here, I improved the pattern detection to minimize or at best mitigate false positives:

It is called “Megadrive…” because it is more prone to blur vertical stripes and more conservative when dealing with horizontal ones, but it does, so it acts like a generic dedither effect too.

However, I expect more Megadrive/genesis games to take advantage of that trick, and less on other consoles, so I’d expect more false positives on (eg.) Snes.

At this point I’m not sure if I want to keep the old dedither code, it’s strength was to be able to catch diagonal patterns, but with much more false positives.

Plus, this implementation will keep ntsc artifacts, where the other one didn’t, I can’t remember who asked for that.

8 Likes

Hello! I’ve been using your shaders for quite some time without issue (downloading from the github for the very latest WIP ones) and all of a sudden they’ve suddenly started stretching out on my Retroarch. I can’t see anything different in settings, it just happened without obvious cause from one day to the next.

Any idea what might be causing this?

1 Like

Yes,

assuming you are using the development version, and recently upgraded to retroarch 1.20,please [check if points 2 applies]

tl:dr: koko aio does not blindly assume 4:3 by default anymore, so what you see is the intended aspect as set by the core.

If you want 4:3, I’d suggest you to set that in core options (or in the shader options, but the former is the suggested way).

…I’d open a bug report to dosbox pure core to change its default; not sure why they opted that way:

  • Aspect Ratio Correction [dosbox_pure_aspect_correction] ( Off (default) | On)
    When enabled, the core’s aspect ratio is set to what a CRT monitor would display.
4 Likes

How different is this new option from -5 uncorrected aspect ratio?

uncorrect is xsize/ysize but you could display eg: 1280x720 at 4/3 if the core asks for it.

eg: Megadrive games have the same resolution but will look different on Pal and Ntsc versions as the core asks for different Aspect.

1 Like

I opened this bug report; you may vote or comment with your opinions:

3 Likes

Hi @kokoko3k

why sometimes the background overlay appears upside down? I’m adding some art to vertical games, some of them work fine and others I have to edit the presets. All these games I run with FBNeo.

It’s a well known retroarch issue, But I didt knew it affected FBNeo too (only Hardware renderers AFAIK).

If that is the issue, switching from/to GLCore/Vulkan should fix it.

1 Like

Again on this, I just reverted the aspect to force it to be 4:3 for VGA* presets, since VGA monitors were 4:3.

Also, I just realized that following the core aspect would break almost all overlays that needs to blend with the monitor frame when core does not report 4:3.

So the behaviour of the preset “-7” is to use the core aspect when no BG/FG image is used, and another preset, “-8” has been added to always force core aspect:

2 Likes

Just an opinion: I think leaving the default aspect at 0 is the safest and most compatible option with our presets and cores, and -7 -8 should just be optional, not the default.

1 Like