New CRT shader from Guest + CRT Guest Advanced updates

With guest-advanced shaders, you can use the Internal Resolution Y: 0.5...y-dowsample divider parameter to increase scanline height.

It’s found under [ INTERLACING OPTIONS ].

3 Likes

I think the setting you’re after are:

-To enable scanlines again-

Interlaced Mode: 0

-To size the scanlines properly for increased game resolution-

Internal Resolution Y: 0.5…y-downsample divider: 0.5 for 640x480, 1.0 for 800x600, 1.5 for 1280x960, etc.

libretro forums please don’t screw my formatting challenge. u.u

2 Likes

Could you put down the shader settings you used for this screenshot for me to poke at and learn from?

1 Like

Sure, here are the parameters for the ntsc version:

ntsc_gamma = "1.350000"
ntsc_taps = "15.000000"
ntsc_charp = "6.000000"
ntsc_charp3 = "2.500000"
ntsc_cscale = "1.200000"
ntsc_cscale1 = "1.500000"
ntsc_ring = "1.000000"
ntsc_sharp = "8.000000"
HSHARPNESS = "1.500000"
SIGMA_HOR = "0.700000"
S_SHARP = "0.800000"
HSHARP = "1.500000"
MAXS = "0.200000"
HARNG = "0.750000"
FINE_BLOOM = "3.000000"
mask_bloom = "-0.750000"
halation = "0.200000"
gamma_c2 = "1.250000"
clips = "0.350000"
gsl = "-1.000000"
scanline1 = "5.000000"
scanline2 = "15.000000"
scans = "1.100000"
shadowMask = "10.000000"
maskstr = "1.000000"
maskboost = "1.400000"
mask_gamma = "1.500001"
slotmask = "1.000000"
slotmask1 = "1.000000"
edgemask = "0.800000"
4 Likes

An alternative to any downsampling is to disable scanlines in Guest (or any shader of your choice where you can make them effectively disappear), then attach the res-independent scanlines from the “Scanlines” folder. Enter 272 as simulated height. In this example the gaps aren’t quite BVM wide because I don’t have the necessary resolution when using the minimum 2 pixel mask, but with 4k it should be different. Well, to the extent you can see anything on a phone screen.

4 Likes

I must test your tip next time, it seems to give more control. But I think we can technically set downsample without really downsampling in Guest’s shader, in the interlacing section there’s a boolean to set “high-res scanline (prepend a scaler)”. It should work for classic resolutions and content that was upscaled 2x, 4x or 8x (likely not for non integer ratios I think).

I was tweaking that option yesterday, trying to make a Guest’s advanced shader preset for the weird but great Gabriel Knight CD-ROM version. This game had mixed VGA 320x200 4:3 that was not evenly upscaled to 640x480 4:3 for the rise of SVGA graphics, so ultimately the game is SVGA but with uneven weird blocks of its VGA version mixed in. With “high-res scanline” set to 1 and Y Internal resolution downscaling =1 I can force 240 scanlines (which is not correct, but neither is 200 because they upscaled VGA so weirdly). Interestingly you can see all the SVGA parts of the image still retaining a lot of detail (like the UI and the newspaper on the desk).

3 Likes

@kanjieater As promised: AzMods.

2 Likes

Just for some more info, guest advanced downsampling on y-axis “always” does integer level resolution reduction in an integer value (greater than 0.0) is selected.

It’s fitting the situation almost every time, especially when a core supports internal resolution multiplying.

There are also possible values like “3.5”, a plausible option with some cores like N64, which operate at selected original resolutions (i.e. 800x600, 1024x768…) instead.

With the mentioned DOS game using “1.0” parameter value does a smart integer resolution divider, which favours certain scanline resolutions (based around 200-240). Specific scanline resolution isn’t forced, but specific integer divider instead.

If a game runs in 640x480, then downsampling to 240px is probably the only reasonable option. If vertical pixel information gets discarded in the process, then there are interpolation options for both x and y axsis, which add the flavour of quality downsampling.

3 Likes

Got a little time to play in the lab today, testing out new filtering, glow and both the new “Mitigate mask” settings:

Wanted to try cranking that “Mitigate Mask on edges” setting to the max and try to create something out of it, I see some potential there. If not then using it at 0.5 also brings good results.

4 Likes

Still doing some improvements. Can say with a degree of certainty that the new edge-mask setting does a really nice finishing touch on some presets:

Previously i wasn’t 100% happy with some edge transitions, now (with private test version) it’s much better in most cases.

13 Likes

Man, it’s getting better and better with these NTSC updates to look closer to the 80s and 90s

4 Likes

New Release Version (2025-02-28-r1):

Notable changes:

  • Mitigate Mask on Edges functionality/parameter added (standard, ntsc, hd, fast versions).
  • New: “side effect” mitigation for the new functionality, is now nicer to include within presets.
  • Edit: small improvement, grade black level parameter range increase.
  • New: Mitigate Mask on Edges effect refinement.
  • New: Support for scanlines with internal resolution parameter range increase.

Download link:

https://mega.nz/file/JlRhBZKC#LEsJaoDuSuyL5G2GmADnxamoW1lZaR53YiUsm6ebr-w

12 Likes

Nice. Since the last update I been going back and forth trying out different looks using the Mitigate Mask Edge setting on both 1.00 and 0.5. They both give off its own look. I love how it looks at 1.00 but not sure if leaving it there will cause unwanted artifacts on edges.

1 Like

I’ve been satisfied with my basic shaders for a bit and hadn’t been playing around with them for the last few days - but your new pack will make me revisit this. Thanks for sharing!!

2 Likes

Quick testing of the last update, it looks really nice, mask blacks now look more pronunciated :smiley: I’ll keep testing, good work as always.

6 Likes

Playing with the newest update. Things are looking a bit different compared to my current presets.

Current preset:

What I’m working on now:

Toned down the glow a bit. Still tinkering.

8 Likes

The new look is imo quite well fitting a specific set of games like PCE or NES for example. Surfaces and details manifest on it’s own specific way. I think it’ll be a nice upgrade overall.

5 Likes

Thank you guest.r, I notice details popping out more in that shot as well. I probably won’t do too much more tinkering for the most part but I’ll see.

2 Likes

yeah I think the new look is better, thanks as always guest.r, I think that the only things that missing are setting internal resolution for ntsc pass (to make it fast and accurate with core upscaling) and reshade update to the uptodate CRT Guest Advanced shaders

2 Likes

I have already made some testings with this, but different implementations are possible. Currently NTSC resolution scaling is sortoff a thing, but it also affects filtering strength. Good reminder nevertheless.

Edit: after some testing it’s a fact that texel fetch width in 2nd pass has to be increased too or strong non-regular artifacts are happening.

Here is a quick info on how ntsc internal resolution scaling translates to game internal resolution:

  • with 2x use 0.50
  • with 3x use 0.33
  • with 4x use 0.25
  • with 5x use 0.20

With ntsc internal resolution scaling current implementation it’s also ensured that internal game resolution increases remain consistent (PSX games…).

4 Likes