Koko-aio shader discussions and updates

So, what would those settings look like in the shader preset?

1 Like

Sorry too much cryptic.

in phosphor grid-> Horizontal mask:
mask type preset set to manual (0.0)

“mask done with 2 slots”
…means phosphors gap count set to 2

“rgb overlapped to position x=0” and "“second empty”
…means r,g and b phosphors position set to 0.0
second empty
…means nothing goes outside that, all to 0.0.

“staggering r and b to the opposite position y +/- 0.60”
…means deconvergence y r set to -0.6 and deconvergence y b set to +0.6

1 Like

Many thanks.

30 char…

I did not understand how to do it I will wait for the update lol

It is not difficult, set the mask preset to 0 (manual), then set the mask size to 2, then manually set the horizontal phosphors position (all of them, r,g,b) to 0.0, so that at position 0, you have rgb overlapped and at position 1 you have a blank space:

If you set something like this, instead, you would have green at first position 0 and r+b overlapped at position 1.
image

Now, when you enable the vertical devconvergence in the scanline section: image You are staggering the phosphors, so while they still are on the same x position, they do not fully overlap anymore over the y position, because red goes slighlty up and blue down.

This is the result of the second example, green lies alone on his 0.0 position, while blue and red shares the position one, vertical overlapping slightly:

image

3 Likes

Glow sharpness x/y parameters now can go down to -2.0; this allow you to go to a full unsharp setting instead of blurring, which could came handy… …if you want to cheat and use FXAA :slight_smile:

The following pictures are indeed using FXAA, but his blurriness is reverted with glow x and set to -1.05

glow y set to -1.05 too to help with vertical sharpening:

Monitor-FXAA-sharp-Aperturegrille.slangp

11 Likes

Newbie question: what is the difference between the various ntsc presets (e.g., tv-NTSC-1 vs tv-NTSC-2)? Tks, this is awesome shader!

1 Like

Thanks,

Ntsc artifacts emulation is nowhere complete, it is good for Megadrive emulation, but lacks for other systems. NTSC-2 is meant to look better (although not accurate), for snes and friends.

The effect is this:

vs this:

This one blends artifacts more: tv-NTSC-1-selective.slangp

While this is the new work in progress preset (found in WIP subdirectory in dev builds) which selectively blurs artifacts and uses antialiasing, meant to look good, not accurate:

presets-ng/WIP/Tv-NTSC-Selective-Balanced.slangp

10 Likes

Underlying vignette implementation has been switched from length()+smoothstep() to a dumber cos(x)*cos(y), which looks the same, but is a bit faster.

However custom presets needs to be updated, please divide vignette size by 2.5.

So that if you used, say, 3.0 as vignette size, set it now to 3.0/2.5 = 1.2

4 Likes

Thanks to @oldpainless for providing the base preset which is the base for this new one:

Monitor-Screen_Hmask_Overlapped-oldpainless.slangp

It overlaps and y-staggers phosphors; this mask configuration has also turned into a preset parameter here, number 7, wx, means white(r+g+b)+gap:

Also, an excuse to show some Amiga games :slight_smile:

7 Likes

Which CRT are these screens taken from? :grinning:

Joking aside - stunning!

2 Likes

I was playing around with the gameboy mono shader and I really like that it don’t need integer scaling. But is there a config to make the colors look more like this?

A GB pocket color scheme would be nice to. I was trying but didn’t get it right.

3 Likes

I spent some time on this, because that colorization is not achievable with my implementation.

To understand why, I blindly tuned koko-aio as i would do normally:
So, by taking the bright hue and the dark hue, as explained here

…then i feeded tuned koko-aio and dmg.slangp with a dumb black to white gradient and found that the problem lies here:

koko-aio down: linearly fades hue and brightness without clamping at all.

dmg.slangp up: it clamps the dark for the first 10%, then starts to fade, but while the brightness fades linearly, the hue stays versus the blue for longer, it is not linear at all.
I don’t know why it acts that way, but it doesn’t look right to me.

Koko-aio maps the input grayscale picture from the core linearly to a hue gradient defined by hue-bright and hue-dark parameters, and optionally shifts the gradient edges to one of the two hues via the bias parameter:

The following are the default colors i copied from internet pictures of real hardware:

Here I tuned some color parameters to better match what you asked, but i don’t remember any blue tint on original gameboy honestly:

As you can see, the color shifting from the yellow background to the blueish foreground is different, less steep. Those are the parameter changed over the default gameboy preset just in case:

brightness 0.12
contrast -0.29
hue bright: 0.17 
hue dark: 0.55
saturation: 1.10
Grid strength: 0.20

For gb mono color, unfortunately color schemes are not supported, you can still use the coloring done by the core itself, why not?

I tested my implementation again with gb pocket mono, by taking an online shot from a real gameboy:

Then I found the bright hue and the dark hue and reported them in koko-aio; this required a bias adjust, adjusted brightness/contrast/saturation by gut:

brightness -0.10
contrast -0.25
hue bright: 0.25
hue dark: 0.14
hue bright-dark bias: -0.58
saturation: 0.24
9 Likes

That was really in depth, thanks. I will try the gb pocket parameters, it looks really good in your sample.

1 Like

You’re welcome!

bg picture would need to be adapted or zoomed to hide the yellow background; also, I activated the rounded corners under curvature section (without warping ofc)

That looks promising. Preset has already been released?

Which one?

Greenish Gameboy mono with overlay is in the dev repo, bluish and pocket ones are not.

2 Likes

Hi Kokoko3k - your “FXAA Sharp” presets are an absolute marvel, exactly what I was looking for, I love them - I wanted to ask you if you also had a smooth version of these presets planned and how could I go about applying the background you have in the “ambient immersive” presets to these - phenomenal work, maybe I finally don’t have to change computers to have the visual effect I wanted with retrogaming (the PS2 emulation on my Mini-PC is still heavy) - thank you very much for this stratospheric result that you share with us.

1 Like

P.S. My request comes from the fact that, in particular, your FXAA Sharp NTSC Selective preset is perfect for Megadrive games but gives problems with Super Nintendo games, having a version that is smooth without using NTSC would be the icing on the cake.

1 Like

You’re too kind…

FXAA sharp presets can be smoothed by just moving Sharp X in the glow section from -1.0 to something higher, try around -0.65 for box blur or around 1.0 for gauss.

You can also try to do the same with Sharp Y, but due to current implementation, that could lead to some artifacts in high contrast zones, try…

The immersive preset draws a big bezel and …a colored room around the game, leaving not much space to draw the scanlines properly; this means that the coolest masks you see in other presets would produce moiree at least on 1080p, and would need higher resolutions to work properly.

You can try to resize the window to see what I mean.

For this very same reason (maximize game area), I made all NG presets with a wider bezel; but yes, I can see if I can make another immersive preset with a different mask, but don’t expect miracles.

1 Like