Koko-aio shader discussions and updates

Of course! Here’s how I’ve got the B&W Borrowed Time to look like that:

#reference "shaders_slang/bezel/koko-aio/Presets-4.1/tv-NTSC-1-classic_take.slangp"
NTSC_MIX = "3.000000"
NTSC_FILTER_SCF = "3.75"
DO_SPOT = "0.000000"

The Subcarrier Frequency Mul (NTSC_FILTER_SCF) parameter is the key. As you increase or decrease it the colors will change wildly, until you find a sweet spot where they get “stabilized”.

Here we have The Bard’s Tale (Apple II), in B&W:

Now, the same game with the “tv-NTSC-1-classic_take.slangp” preset and the parameters specified above:

If I change the “Subcarrier Frequency Mul” from 3.75 to 3.74, I get this mess instead:

There are other spots where the colors get stable, though, although the palette gets quite different. I’d guess that for some other games/systems you’d have to fiddle with this value until things get right.

Here’s what I get with a value of 5.25:

And here’s the rather cursed/cool 6.00:

For comparison’s sake, here’s the raw image of the game in color mode:

2 Likes

Oh, btw, switching gears a bit. Do your handheld shaders come with color-correction and LCD ghosting effect built in? I’m trying to find if I should use the options on the emulator or if I could rely on the shader for that.

No palette or lut based corrections. The Gameboy mono preset is using hue shifting, gba relies on core corrections.

Ghosting is possible, but used by gameboy mono preset only.

I see. So, if I understand correctly, I don’t need to use the emulator’s LCD ghosting effect simulation with the gameboy mono preset?

1 Like

Yes, already active in all gbmono presets because it was so evident.

I left it disabled in other handhelds, because most lcd already emulates that …by design :smile:

2 Likes

Exploring interactions between warped glow, glow light sharpeness and fxaa.

The antialiasing works by emboldening brightest areas. but seem to respect enough the original shapes; also the tipical fxaa “the dog licked the screen” effect si mostly gone :

The settings used are fxaa enabled, glow to blur bias 0.0, glow light gain: 4.0, glow light sharpness: 1.74, sharp x,y: -1.0, warped glow x,y:0.75 and warped glow dynamics: 0.44

7 Likes

Exceptional, congratulations! PS in these screens which preset did you start from?

1 Like

It’s ng/monitor-screen-hmask-screen-slotmask-taller

1 Like

Just tweaked VGA doublescan presets and added Green and amber variants.

-edit-

Also, new release 1.9.30 merge request submitted to Retroarch shader Repo, should be available soon:

  • REMOVED: Removed support for Retroarch versions prior to to 1.16 due to the use of the rotation uniform.
  • REMOVED: Removed dot matrix debug parameter
  • REMOVED: Y-Tilt FOV option gone.
  • NEW: Adjust content/bezel size by also taking width into account
  • NEW: Add presets for PSP
  • NEW: New parameter: “Interlaced scanlines brighness push” used to lower input gamma When emulating interlaced screens: Useless for fast response screens such as OLeds
  • NEW: Scanline inflation turned into a generic Warped glow setting which can be applied to x axis too.
  • NEW: Add a new subfolder “Presets_HiresGames_Fast” containing speedy presets
  • NEW: VGA Dobulescan monochrome green and amber presets
  • CHANGE: Corners now have a 4:3 aspect
  • CHANGE: Y-Tilt does not require you to tweak Bezel tilting
  • CHANGE: Lowered default flicker power across the presets (but the flicker one).
  • CHANGE: General Presets tuning
  • CHANGE: Docs update
  • FIX: Keep Deconvergenge constant across input resolutions
  • FIX: CVBS color bleed: keep the size constant across input resolutions intended for Hi resolution content (640x480+) that don’t use 2x internal processing
  • FIX: Back/Foreground image: correctly scale offset so that it is in “sync” with content position
  • FIX: Fully commented config-user.txt, sync’d with config.inc
  • FIX: Usual work to enable specific workarounds for D3D11,12
  • FIX: Lowered RESSWITCH_SAMPLING_POINT because too near to the screen border
  • OPTIMIZED: Slightly optimized fn_border
  • OPTIMIZED: Optimized halo vs scanlines blending
  • OPTIMIZED: Skip unneded alpha channel assigningments to FragColor
  • OPTIMIZED: Debanding: spare useless calls to scale_to_range()
  • Overall performance vs previous release lowered from 111 to 108 fps measured by my standard benchmark on Haswell. this is mainly due to new warped glow feature.
11 Likes

How much faster are the “HiresGames_Fast” presets? And what are the compromises?

Basically no compromises as long as the core resolution is high enough.

To simplify, for low res content, the shader does 320x240->640x480->“process”, where “process” needs at least 640x480 to look good.

If the content is already hires, fast presets just do: 640x480->“process”, where the classic presets would upscale everything to 1280x960.

Working internally in 960p is very heavy and even if there would be visual benefits to the expert eye, they still do not justify the performane hit.

It can depend on the hardware, but I’d say fast presets almost halves the gpu consumption at 1080p.

See here too.

1 Like

Currently working on a way to proper display as much mask as possible while retaining as much brightness as possible, no color clipping and accurate input->output tone ramps.

The idea is to fully take advantage of what the mask can give by pushing the input gain and make the mask clip (3X). Only from that point, a brightness helper is used to reach full non masked white.

When the scene is dark, the mask alone can be used to accurately reproduce it. but when the scene or part of it is too bright, original color is used to help.

You know, this is nothing new. I’m just trying to find an handy way to ensure that the mask is helped only when needed.

Due to the (de)linarization process, one can expect to see pure mask till about 60% of the input brightness.

I’m using Green/Magenta masks, because I found that at least on 1080p/relatively low dpi screen, make the most of using an RGB mask is not giving good results, maybe they would look better on a higher viewing distance/or lower sized monitors:

6 Likes

Hi @kokoko3k - I have attached photos that speak for themselves, you are the messiah of 1080p !! Thank you for your heartfelt work !!

2 Likes

This seems to be another one of your brilliant concepts @kokoko3k! Thinking outside of the box as usual!!

3 Likes

Progressing on the “mask and brightness, no matter what” campaign:

Unfortunately, that mask (rgbx) may look weird on some displays with cruched blacks and artifacts on the sides, this should alternatively works a bit better (rbgx):

And as a last resort, this one seem to work on all of my monitors without issues (rbg):

4 Likes

That mask looks sexy, looks like you’re going for a more saturated/more contrast look too. I like how lately there seems to be a small rise in users brightening their presets (you and RetroGames4K).

I like the middle shot the most, the colors and the mask itself seem to pop more there.

1 Like

Thanks, my presets in the 4.1 folders are fairly bright; the ng ones less bright, not not too much; if you have a decent black level and can rise the monitor brightness, you can enjoy more mask.

…that leads to my recent work, that tries to overcome mask limitations only when needed.

Unfortunately i’m finding that dealing with so much mask and precise blending between fake colors given by the mask itself and true colors used to mitigate it, exhibits a lot of final display issues like monitors not well calibrated and their inability to properly display the masks.

The first shot makes my laptop crazy in the borders, showing weird horizontal lines and crushed dark tones, the second one mitigates (not completely) the issue, but gives me a global weird slightly red tone. On another display, green/magenta masks are totally rubbish.

And all of them are RGB subpixel based.

The only masks that seem to work on all of them are standard rgb or rbg (3rd shot).

2 Likes

Oh yes I know. You’re pretty much one of my “go-to’s” when I want to take a break from using my own presets, both you and Hyllian’s pack. I always go to your “slot mask bloom” preset.

I’m going through something similar tweaking Shadow Mask at 4k, I really dislike that green/magenta look ugh.

If it comes down to it that one looks good as well, the rgbx one gives a crisp sharp look while the rgb one looks smoother. I could see myself switching between them both during a gaming session for different experiences. I say keep the rgbx one around and maybe play around with it some more if you think it can be improved more somehow.

1 Like

These shaders are excellent. PC users appreciate it. :pray:t2:

Sorry to open such an old topic, I have discovered some things that may be interesting. @ROBMARK85

This is an IBM technology Initially known as “Double Scan and Border Support” and later “Double Scanning…”.

Not all modes (adapters/monitors) produced double lines.

The modes prior to VGA; Hercules, CGA, EGA Tandy, etc worked at 15.6kHz and produced 200 lines, and 21.5 kHz for 350 lines. VGA is 31.5kHz/60Hz for 480p and 31.5kHz/70Hz for 400p.

Line doubling is unique to VGAonly, it takes 200p content and draws each line twice to enter 400p mode. SVGA on the other hand, loads the 200p content in 480 mode and stretches the image using polarity of the sync signal. The visual result is identical.
Computers and micros of the time produced 240p maximum, with the exception of PC-98 which had 400 lines on a 24kHz monitor.

That is, when you load a 200p/350p CGA/EGA game on the original hardware you see single lines, and when you load it on VGA/SVGA hardware you see double lines. In this video PhilsComputerLab makes a good comparison.

In this sense, DOSBox is faithful to the original hardware and when you load a 200p EGA/VGA game with the VGAonly adapter, the vertical resolution doubles from 200 to 400. And any shader will produce double lines (in some cases you have to disable interlacing).

And also, Schelling is currently implementing an option for DOSBox Pure, which duplicates the lines in all modes. This is very interesting.

And I have also seen several shaders that are capable of drawing double lines in 200p content, duplicate/split or adjust the resolution. There is one that I really like, the crt-blurPi…

4 Likes

Thanks a lot for the info @alexb3d - I was a happy owner of 386 and Pentium later with VGA monitor and the shader of @kokoko3k brought back to mind exactly those feelings, so much so that for the moment I abandoned the idea of smoothing to search for a shader style more faithful to what was my past experience, and I’m rediscovering a world now gone by for several decades. If I’m not mistaken however the kokoaio shader uses the “Double Scan” mode in the specific PC preset.

PS In fact, thanks to these technologies, I have always considered the computer to be clearly superior to console images in terms of video quality. Unfortunately, it was cheated by the availability of titles and brands, many remained tied to consoles, even if lately the gap has almost closed.

2 Likes