Koko-aio shader discussions and updates

Anybody interested in this kind of emulation?

This is almost 100% correct interlacing behaviour, where even/odd fields are rendered respectively only on even/odd frames.

As you can see, this produces ghosting on fast movement scene, but the real thing was that way.

Let me know!

5 Likes

Absolutely beautiful! I’ll try it right away.

P.S. I think I should turn off phosphor persistence with these Interlaced modes, it gives bad results with both koko-aio and mega bezel, too much color smearing (if that’s the term).

1 Like

I’ve not yet pushed anything, just testing if it would be of any interest to anyone.

Crts was a different beast, I’not sure why interlacing looked right on them.

…also, contrary to my belief, it seems that at least flycast fails to set the needed fps change info available to retroarch, and interlacing artfacts is not a something you’d want to see when a game switches to 30fps.

Maybe there’s a workaround shader side that involves averaging frametimes.

2 Likes

I actually have a separate koko-aio setup/pack for a VGA CRT I have, I wonder how this new feature will work there when it’s ready.

If anyone needs my CRT pack I’ll share it on GitHub with the others, it’s using no bezels whatsoever, and the handhelds can just use the other ambilight pack I posted.

I’m very happy with koko-aio on CRT overall:

You can even do fun stuff like this:

Geometry looks better in person

5 Likes

(merged)

Yeah, real VGA crts may benefit from that, indeed, but real CGA/15Khz ones can set an interlaced mode by themselves so that function is almost useless there.



User side, there is a new static setting commented in config-user-optional-template.txt:

// #define ORIGINAL_FPS_TRUSTED

Uncomment that will cause the shader to trust the fps reported by the core and will take the faster path to understand what is the content fps.

Leaving that commented, the default, will cause the shader to estimate input fps; a bit less precise, bit heavier and bit laggier way, but that will work with all of the cores, so it is the default.
Indeed, not all cores reliably tell retroarch what is the current fps; eg: flycast has a setting to do that, disabled by default, I think because it causes stutters due to the core itself:



Anyway, “ORIGINAL_FPS_TRUSTED” and fps detection are preparatory to disable 2 interlacing settings when the content falls under 35 fps:

First one was already implemented:

Second one has just been pushed:



So, to recap, the new “Real interlace” setting will convert progressive input to interlaced one, the parameter will modulate the intensity of the effect and the effect will be skipped on low fps content (25 to 30).

I suppose it will be useful on screen with a low pixel refresh time like oleds or real crts, where you’re supposed to set the effect strength to the maximum to replicate the “intended” behaviour with interlaced content.

3 Likes

Would it be a problem if the backdrop picture were always shown below the bezel and below the foreground image?

Asking because I’d like to optionally use the backdrop texture to show screen dirt/scratches/ambient reflections which should obviously affect just the tube and implementing other options always hurts performance a bit.

Let me know!

1 Like

@Starman99x: have you managed to try how real interlacing feature works on real crts?

Just curious.

1 Like

Hi koko, I think there’s no problem in having the backdrop always show below everything else, isn’t that how it has been working anyways?

As for the new real interlacing feature on a real CRT; I’ll try to record a video or something if I get decent performance with my CRT setup, as it’s hooked to a rather weak laptop (the only one I got with VGA).

But first please help me debug the latest koko-aio dev version:

[INFO] [slang]: Compiling shader: "D:\RETRO\RetroArch\RetroArch_1.19.1\shaders\shaders_slang\bezel\koko-aio-dev\shaders-ng\colortools_and_ntsc_pass.slang".
[ERROR] [slang]: Texture name 'avglum_passFeedback' not found in semantic map, Probably the texture name or pass alias is not defined in the preset (Non-semantic textures not supported yet)
[ERROR] [slang]: Failed to reflect SPIR-V. Resource usage is inconsistent with expectations.

I tried base.slangp and I’m using the d3d workaround too.


EDIT: OH my bad, I was using RetroArch 1.19.1, I forgot. I actually put it inside the latest version with symbolic links inside to avoid duplicated shaders, configs, assets, etc.

Oh and that reminds me to thank you again for fixing the wildcard issue with RetroArch.

2 Likes

Unfortunately video recording was too demanding, best I could do was some screenshots (which don’t convey much):

I think I did not notice much of a difference between CRT/LCD, maybe I’ll try other games/cores later.

Overall the effect looks smooth and subtle in motion and I like it on both displays, but since I’m no expert in interlacing it’s hard to give a useful feedback, I even might be getting the wrong results on both displays due to using the d3d workaround, can you confirm that d3d works as intended with this feature?

1 Like

Yeah, settings look good and D3D is supported by that.

However I cannot see any interlace artifact in the screenahots; that culd mean the game has been paused prior to take the screenshot or gpu screenshots does not capture feedback frames.

Pausing via tha “k” key, then taking the screenshot via operating system (windows stamp key) should work reliably instead.

Btw why are you using D3D?

1 Like

Not really, this is from @estefan3112 work, it uses a backdrop that fills the screen and an image over it, so another option is definitely needed.

2 Likes
  • Turned backdrop texture into a generic “Mid overlay image” that sits between the content and the topmost foreground image.
  • Added an option to display it just over the content and tied to the content coords; this means it curves with content, zoom and tilts with it.
  • mid overlay power/transparency is modulated right by the first starred parameter.

It is good to provide high contrasted and low saturated pictures to have a more realistic effect; a big and soft spot helps in emulating the diffused light, if absent in the picture.

That’s the Cody’s bedroom:

10 Likes

Nice! I’ll have to try my standard screen reflection image.

1 Like

Roger that, I will take proper screenshots soon.

Well, since this particular laptop is old, some windows 10 update broke frame pacing with OpenGl, and only D3D works smoothly now without stuttering.


@kokoko3k

EDIT: it turned out that the game I tried “Daytona USA (USA)” was somehow reducing or eliminating the effect.

So here are some correct screenshots:

Despite the intense ghosting you see in the still frame screenshots, the effect is quite subtle and “fast” in action.

I want to say congrats on making the most convincing interlacing emulation I had tried so far. I think it’s finally unlocking my fuzzy memories on how it looked back then on consumer CRTs.

2 Likes

I did more tests with my LED panel, and I can confirm that the effect looks better on CRT thanks to its natural motion clarity. While on LED it’s a bit disorienting (excessive motion blur) which isn’t surprising.

It’s a good thing that you made the effect adjustable.

1 Like

Yup! That exactly what I was hoping for and the intended use case, thanks for testing deeper.

1 Like

I like the new mid overlay feature, it worked great with MBZ’s diffuse image:

2 Likes

Late feedback regarding the dedithering/transparency features:

I have extensively tested both dedither and MD transparency features, and both proved to be useful. Some dithering patterns will only respond to one feature.

For example the Silent Hill ps1 dithering will only blend with MD transparency.

While the Atari ST OS wallpaper “tos206us.img”, only blended with the Dedither feature.

In cases where both worked, dedither tends to be sharper and easier on thin text, while MD Transparency is overall more effective but blurry. So I hope both will stay in the future.

1 Like

Is every pack going be having a reflective image now? It does give a good fell to the graphics. The problem that comes with it is what to reflect, of course.

Indeed, I’ve still to find something that appeals to me.

1 Like