Koko-aio shader discussions and updates

Artifacts gone, probably, but mask too.

I’ll make a test pack with the modified shader and a test preset, but consider that I’m an lcd@1080p user :sweat_smile:

1 Like

…And this couldn’t be done on the blurred Mask/Glow effect alone with the real Mask remaining unfiltered/not resampled?

Don’t worry man, we’ve got your back. Just remember less is more. Even if there’s only a slight improvement to the phosphor shape/appearance, I’ll gladly take and appreciate that as it means everything that is built using those phosphors has the potential to be improved.

Yes, but it would be ineffective, since it is the detail in the mask itself to produce the artifacts. Lower the target TVL would help, but numbers suggest that you’ve to go much lower than 500 to hope for a good picture even on 4k.

When I’ll post the test shader, the target TVL will still be configurable; it is still koko-aio with a slight modification to halo the phosphors.

1 Like

First time messing with Kok-aio. Really nice! Question: Is there a way to import MegaBezel presets into this, or can I just copy/paste settings? I love the bezel/background glow, but want my own pixel presets for the actual CRT itself.

1 Like

Nope, they are totally different projects with different parameters.

To match it, you can either take a look to the koko-aio docs and/or post a screen of the preset you want to replicate to get help.

1 Like

One example of where I’m at with my customization in MBZ:

Not very easy to replicate. Each have around 46 shader passes. You’ll probably have to open in a separate window to remove artifacts, see at full 1440 resolution.

I’ve also got shadowmask presets, some for various monitors, such as 1980s RGB, VGA and Commodore 1084s.

Your 1084s preset is pretty nice, btw.

2 Likes

Please check this, I think bloom may still need a bit of tweaking (mine and yours are a bit too much for my taste anyway :slight_smile: ) @MrBlastman

Preset
IN_GLOW_GAMMA = "2.200000"
GAMMA_OUT = "0.440000"
DO_CCORRECTION = "1.000000"
IN_GLOW_POWER = "2.000000"
CONTRAST = "0.050000"
VIBRANCE = "0.100000"
DO_SHIFT_RGB = "1.000000"
OFFSET_STRENGTH = "0.250000"
DO_IN_GLOW = "1.000000"
IN_GLOW_SPREAD = "1.700000"
IN_GLOW_W = "3.000000"
IN_GLOW_H = "7.000000"
DO_PIXELGRID = "1.000000"
PIXELGRID_MAX_H = "0.750000"
PIXELGRID_GAMMA_H = "3.599999"
PIXELGRID_MUL_X = "2.000000"
PIXELGRID_H_PRST = "0.000000"
PIXELGRID_H_COUNT = "2.000000"
PIXELGRID_R_SHIFT = "0.300000"
PIXELGRID_G_SHIFT = "0.500000"
PIXELGRID_B_SHIFT = "0.700000"
PIXELGRID_MIN_W = "0.500000"
PIXELGRID_MAX_W = "0.500000"
PIXELGRID_GAMMA_W = "6.199998"
PIXELGRID_BASAL_GRID = "0.020000"
PIXELGRID_Y_MASK = "0.000000"
PIXELGRID_Y_MASK_HEIGHT = "-2.000000"
PIXELGRID_Y_MASK_OFFSET_DEHIVE = "0.230000"
PIXELGRID_Y_MASK_ON_WHITE = "0.000000"
HALO_NO_PREGAIN = "1.000000"
HALO_POWER = "1.000000"
HALO_SHARPNESS = "7.000000"
HALO_GAMMA = "1.000000"
HALO_GAMMA_OUT = "2.350000"
HALO_VS_SCAN = "0.260000"
DO_BLOOM = "1.000000"
BLOOM_MIX = "1.000000"
BLOOM_SIZE = "1.000000"
BLOOM_GAMMA = "2.000000"
BLOOM_GAMMA_OUT = "3.000000"
BLOOM_POWER = "2.000000"
BLOOM_EYE_ADPT_SRT = "0.000000"
BLOOM_EYE_INERTIA = "10.000000"
BLOOM_OVER_WHITE = "1.000000"
BLOOM_HALATION_MIX = "0.700000"
DO_CURVATURE = "1.000000"
DO_BEZEL = "1.000000"
BEZEL_FRAME_ZOOM = "0.183000"
BEZEL_REFL_STRENGTH = "2.000000"
BEZEL_CORNER_DARK = "0.700000"
BEZEL_RFL_BLR_SHD = "-0.540000"
BEZEL_ROUGHNESS = "1.500000"
BEZEL_DIFFUSION_STR = "1.000000"
DO_GLOBAL_SHZO = "1.000000"
GLOBAL_ZOOM = "0.928497"
DO_VIGNETTE = "1.000000"
V_SIZE = "1.200000"
V_SHAPE = "0.800000"
DO_SPOT = "1.000000"
S_POWER = "0.067000"

-EDIT-

Since I was there, i made a variant for 1080p, but less bloomy and a with a bit more relaxed colors.

Preset
IN_GLOW_GAMMA = "2.200000"
GAMMA_OUT = "0.350000"
DO_CCORRECTION = "1.000000"
IN_GLOW_POWER = "2.000000"
TEMPERATURE = "7000.000000"
VIBRANCE = "0.100000"
DO_SHIFT_RGB = "1.000000"
OFFSET_STRENGTH = "0.250000"
DO_IN_GLOW = "1.000000"
IN_GLOW_SPREAD = "1.700000"
IN_GLOW_W = "6.000000"
IN_GLOW_H = "7.000000"
DO_PIXELGRID = "1.000000"
PIXELGRID_MAX_H = "0.750000"
PIXELGRID_GAMMA_H = "3.599999"
PIXELGRID_MUL_X = "1.500000"
PIXELGRID_H_PRST = "0.000000"
PIXELGRID_H_COUNT = "2.000000"
PIXELGRID_R_SHIFT = "0.300000"
PIXELGRID_G_SHIFT = "0.500000"
PIXELGRID_B_SHIFT = "0.700000"
PIXELGRID_MIN_W = "0.500000"
PIXELGRID_MAX_W = "0.500000"
PIXELGRID_GAMMA_W = "6.199998"
PIXELGRID_BASAL_GRID = "0.020000"
PIXELGRID_Y_MASK = "0.000000"
PIXELGRID_Y_MASK_HEIGHT = "-2.000000"
PIXELGRID_Y_MASK_OFFSET_DEHIVE = "0.230000"
PIXELGRID_Y_MASK_ON_WHITE = "0.000000"
HALO_NO_PREGAIN = "1.000000"
HALO_POWER = "1.000000"
HALO_SHARPNESS = "7.000000"
HALO_GAMMA = "1.000000"
HALO_GAMMA_OUT = "2.350000"
HALO_VS_SCAN = "0.260000"
DO_BLOOM = "1.000000"
BLOOM_MIX = "0.650000"
BLOOM_SIZE = "1.000000"
BLOOM_GAMMA = "2.000000"
BLOOM_GAMMA_OUT = "3.000000"
BLOOM_POWER = "2.000000"
BLOOM_EYE_ADPT_SRT = "0.000000"
BLOOM_EYE_INERTIA = "10.000000"
BLOOM_OVER_WHITE = "1.000000"
BLOOM_HALATION_MIX = "0.700000"
DO_CURVATURE = "1.000000"
DO_BEZEL = "1.000000"
BEZEL_FRAME_ZOOM = "0.183000"
BEZEL_REFL_STRENGTH = "2.000000"
BEZEL_CORNER_DARK = "0.700000"
BEZEL_RFL_BLR_SHD = "-0.540000"
BEZEL_ROUGHNESS = "1.500000"
BEZEL_DIFFUSION_STR = "1.000000"
DO_GLOBAL_SHZO = "1.000000"
GLOBAL_ZOOM = "1.000000"
DO_VIGNETTE = "1.000000"
V_SIZE = "1.200000"
V_SHAPE = "0.800000"
DO_SPOT = "1.000000"
S_POWER = "0.067000"
3 Likes

That’s really good! Thank you!

Yeah, they are very powerful, as I’m trying to emulate the actual devices, 1:1, and for Samurai Showdown/Arcade, trying to grab the feel of early 90s RGB Cabinet CRTs–which did make my head spin when I was standing up close to them, back in the day. They were intense!

So with Koko, do I then use the overlay function in Retroarch to add backdrops/TV Sets, or do I imbed them such as in MegaBezel, within the actual preset?

In MBZ we have multiple independent layers. I’ll have to read your documentation.

1 Like

I hope you’re noticing how much darker the Gamma is on Neo-Geo games when using the same preset that looks good in terms of brightness in some CPS games like Street Fighter II.

Yeah it’s quite dark-ish indeed.

@MrBlastman For background, check my answer here

My advice to take a look to the docs still applies tho :slight_smile:

Another thing, can you post the original preset from where you took the screenshots? there’s a nice effect that rounded/smoothed the shades on Honda’s skin I wasn’t able to fully replicate and I’d like to take a deeper look, thanks!

2 Likes

That’s interesting that you mention this. One peculiarity I often wrestle with is the difference between CPS/Neo Geo games vs. Super Nintendo vs. Genesis.

A preset that is perfect for CPS/Neo Geo/Mame/FinalBurn may be too dark for Super Nintendo, while fine for Genesis.

For some odd reason a lot of SNES games are darker. Yet, this perplexes me since they should not be, provided all piped through Retroarch.

So I spend a tremendous amount of time tweaking the brightness levels and color channels so nothing gets washed out (for the real displays did not wash out colors, and this becomes particularly challenging with the lightest colors), only to have to modify this when something such as SNES is involved. At least we can raise the dark brightness value independently of the light, which helps, among the dozens of other similar settings.

1 Like

Here’s the full dump:

mega.nz/file/jMcUwAbT#2q7dCS-ZRBmhcqjbSFgowEWBzZu4zeuVqz-R-vNknn0

What I am not sure of is if I took that screenshot with the brighter variant, or this latest one. I am constantly tweaking. Based on the date of the screenshot, this is probably the shader being used.

The colors are also mapped a bit differently in mine, as well, vs. yours. There’s a bit of a shift, but colors are usually one of the last things to be perfected, after all the other features are nailed down.

2 Likes

Trust your eyes as well.

Why do we assume that there shouldn’t be brightness/Gamma differences between consoles and games once everything is piped through RetroArch?

Cores don’t don’t always emulate the differences in filtering or video output circuitry between consoles. So the Raw signal output by a RetroArch core is not necessarily equivalent to a composite or RGB signal output by any of the emulated consoles/systems.

There is that missing link that we must account for using shaders/video filters to match and differentiate the various final outputs of real hardware as well as the various inputs and processing circuits of the CRTs.

There can actually be differences in gamma among arcade games which use different hardware. Magic Sword might look better with a brighter version of that Street Fighter II preset, similar to the NeoGeo games. You can look for shadow details bring crushed in the rocks in the background of the first level to test this.

I even read that some games had tinted/smoked glass in front of the monitor. RetroArch doesn’t account for things like that out of the box.

Then there’s some inconsistency between outputs of different cores, which emulate the same system. I think BSNES has an option to emulate “SNES” colours.

Blast 'Em also looks very different from Genesis Plus GX.

On another note, do you know what really stands out to me about this pic?

It’s aperture grille on an arcade game.

1 Like

I can attest to the tinted/smoked glass. Another common feature of some arcade cabinets back in the day was the monitor on the bottom of the display case, facing upwards, and a mirror in the back of the cabinet reflecting the monitor to the player, which I bet in some cases altered the luminosity/colors of the image, depending on the type of mirror used.

Also, at least in the arcades I frequented often, many of the fighting game cabinets/Neo Geos had aperture grille RGB displays, way back in the early 90s.

What they didn’t have, though, was the typical trinitron horizontal line artifacts one would see on consumer televisions or monitors.

Many of the early 80s RGB monitors in arcades also had aperture grille, and some of them, such as those on galaga/mrs. pac man, for example, would have vertical scanlines.

I do recall many a Rastan cabinet that had shadow mask. So did some of the Midway stuff, such as NARC, which had a very high resolution display for the time.

What became particularly interesting, over time, as the 80s progressed, was how arcade operators would repair their cabinets and sometimes use salvage/junk yard, or non-standard displays to replace the ones that had stopped working properly. You’d end up with games that had washed out picture, or occasionally one with a much better RGB screen than they originally had. Often, though, you’d find crustier tubes, rather than better ones.

Correction: I do recall a number of slot mask cabinets, as well. Myself I often prefer slot mask, but I grew up with a high end aperture grille TV set (these were expensive and rare at the time).

What I did not notice in the slot mask arcade displays was the staggered pattern with one up bright, the next down bright, and so on.

2 Likes

Do you have a source for this? AFAIK Sony kept the patent until 1996 and it was used exclusively for their televisions

1 Like

I could be mistaken, but my eyes and memory tells me the displays sure looked like them, or a variant of slot mask that differs a bit from what we are accustomed to in MBZ.

Viewsonic made a version of trinitron displays in the 90s. You are right, Sony did keep a patent, but there were knockoffs/licensed versions, at least in the 90s.

It’s a damn shame CRTs don’t last forever, would be much easier to grab one for reference.

I do have a 1980s RGB CRT made for home PCs, though, and the slot mask on that one is quite similar to what we see in MBZ, and when the tube is off the vertical phosphor lines are quite visible.

edit: I did find this closeup of what I think is an original SF 2 RGB monitor:

Which has all the hallmarks of slot mask.

There were many, many slot mask RGB screens back in the day.

Hi @kokoko3k, when I load your Monitor-VGA-DoubleScan.slangp it gets messed up when I set the following parameter to 0.00:

MIN_LINES_INTERLACED = "0.000000"

Is this normal behavior? It’s causing me trouble with some custom presets I have.

Please be more specific, this is the intended behaviour:

    Double-scan low input resolutions
        Activate this if you want to double the number of scanlines when the game is low-res.
        "low-res is defined via "Consider Hi-Resolution above # lines" parameter above.
        This option is useful if you want to emulate 30khz VGA CRT monitors.
        If you are on 1080p or lower, consider to activate 
        Fake integer scanlines or integer scaling.

What do you want to achieve?

1 Like

I think you are confused because of the rotated screen, arcades were slot mask displays. Only Trinitron had the aperture grille.

2 Likes

Oh nevermind I should have read the docs. I didn’t know that the trigger res works for VGA too. Thanks koko.

1 Like