New CRT shader from Guest + CRT Guest Advanced updates

Hey @guest.r, a question about NTSC phase.

Phase 2 NTSC (like on Genesis, Saturn) produces a significant desaturation and an overall quality loss of the image, even if it’s the correct option (using auto sets it on 2, which is used for 320px output); if you switch to phase 3 you have “true” colors, better definition, but a loss in dithering.

Is it something I can correct in some way, or is there a way to have the best of both worlds?

Phase 2 NTSC:

Phase 3 NTSC:

1 Like

Thanks @soqueroeu. Is this from a recent version of my preset pack or is it modified in some way? I find the scanlines look a bit uneven in this screenshot.

It could just be the jpeg compression hard at work though.

2 Likes

I don’t remember making any changes to the preset. If you notice any improvement, please let me know.

2 Likes

It could very well be the jpeg compression. If you want to further investigate, you can post a *.png and I’ll take a look.

1 Like

You can increase the NTSC Color saturation parameter for better saturation. NTSC Sharpness (negative) should provide better definition. There are a lot of parameters you can tweak, including brigthness etc.

1 Like

I have been toying around a bit with mame vertical presets:

Newest version is required for this setup, you can also copy the content of the provided dl. version into the slang/crt folder.

shaders = "12"
shader0 = "shaders_slang/crt/shaders/guest/advanced/stock.slang"
filter_linear0 = "false"
wrap_mode0 = "clamp_to_border"
mipmap_input0 = "false"
alias0 = ""
float_framebuffer0 = "false"
srgb_framebuffer0 = "false"
scale_type_x0 = "source"
scale_x0 = "1.000000"
scale_type_y0 = "source"
scale_y0 = "1.000000"
shader1 = "shaders_slang/xbr/shaders/xbr-lv3-standalone.slang"
filter_linear1 = "false"
wrap_mode1 = "clamp_to_border"
mipmap_input1 = "false"
alias1 = "StockPass"
float_framebuffer1 = "false"
srgb_framebuffer1 = "false"
scale_type_x1 = "source"
scale_x1 = "3.000000"
scale_type_y1 = "source"
scale_y1 = "3.000000"
shader2 = "shaders_slang/crt/shaders/guest/advanced/afterglow0.slang"
filter_linear2 = "false"
wrap_mode2 = "clamp_to_border"
mipmap_input2 = "false"
alias2 = "AfterglowPass"
float_framebuffer2 = "false"
srgb_framebuffer2 = "false"
scale_type_x2 = "source"
scale_x2 = "1.000000"
scale_type_y2 = "source"
scale_y2 = "1.000000"
shader3 = "shaders_slang/crt/shaders/guest/advanced/pre-shaders-afterglow.slang"
filter_linear3 = "false"
wrap_mode3 = "clamp_to_border"
mipmap_input3 = "true"
alias3 = "PrePass"
float_framebuffer3 = "false"
srgb_framebuffer3 = "false"
scale_type_x3 = "source"
scale_x3 = "1.000000"
scale_type_y3 = "source"
scale_y3 = "1.000000"
shader4 = "shaders_slang/crt/shaders/guest/advanced/avg-lum.slang"
filter_linear4 = "true"
wrap_mode4 = "clamp_to_border"
mipmap_input4 = "true"
alias4 = "AvgLumPass"
float_framebuffer4 = "false"
srgb_framebuffer4 = "false"
scale_type_x4 = "source"
scale_x4 = "1.000000"
scale_type_y4 = "source"
scale_y4 = "1.000000"
shader5 = "shaders_slang/crt/shaders/guest/advanced/linearize.slang"
filter_linear5 = "true"
wrap_mode5 = "clamp_to_border"
mipmap_input5 = "false"
alias5 = "LinearizePass"
float_framebuffer5 = "true"
srgb_framebuffer5 = "false"
scale_type_x5 = "source"
scale_x5 = "1.000000"
scale_type_y5 = "source"
scale_y5 = "1.000000"
shader6 = "shaders_slang/crt/shaders/guest/advanced/gaussian_horizontal.slang"
filter_linear6 = "true"
wrap_mode6 = "clamp_to_border"
mipmap_input6 = "false"
alias6 = ""
float_framebuffer6 = "true"
srgb_framebuffer6 = "false"
scale_type_x6 = "absolute"
scale_x6 = "800"
scale_type_y6 = "source"
scale_y6 = "1.000000"
shader7 = "shaders_slang/crt/shaders/guest/advanced/gaussian_vertical.slang"
filter_linear7 = "true"
wrap_mode7 = "clamp_to_border"
mipmap_input7 = "false"
alias7 = "GlowPass"
float_framebuffer7 = "true"
srgb_framebuffer7 = "false"
scale_type_x7 = "absolute"
scale_x7 = "800"
scale_type_y7 = "absolute"
scale_y7 = "600"
shader8 = "shaders_slang/crt/shaders/guest/advanced/bloom_horizontal.slang"
filter_linear8 = "true"
wrap_mode8 = "clamp_to_border"
mipmap_input8 = "false"
alias8 = ""
float_framebuffer8 = "true"
srgb_framebuffer8 = "false"
scale_type_x8 = "absolute"
scale_x8 = "800"
scale_type_y8 = "absolute"
scale_y8 = "600"
shader9 = "shaders_slang/crt/shaders/guest/advanced/bloom_vertical.slang"
filter_linear9 = "true"
wrap_mode9 = "clamp_to_border"
mipmap_input9 = "false"
alias9 = "BloomPass"
float_framebuffer9 = "true"
srgb_framebuffer9 = "false"
scale_type_x9 = "source"
scale_x9 = "1.000000"
scale_type_y9 = "source"
scale_y9 = "1.000000"
shader10 = "shaders_slang/crt/shaders/guest/advanced/crt-guest-advanced.slang"
filter_linear10 = "true"
wrap_mode10 = "clamp_to_border"
mipmap_input10 = "false"
alias10 = ""
float_framebuffer10 = "true"
srgb_framebuffer10 = "false"
scale_type_x10 = "viewport"
scale_x10 = "1.000000"
scale_type_y10 = "viewport"
scale_y10 = "1.000000"
shader11 = "shaders_slang/crt/shaders/guest/advanced/deconvergence.slang"
filter_linear11 = "true"
wrap_mode11 = "clamp_to_border"
mipmap_input11 = "false"
alias11 = ""
float_framebuffer11 = "false"
srgb_framebuffer11 = "false"
scale_type_x11 = "viewport"
scale_x11 = "1.000000"
scale_type_y11 = "viewport"
scale_y11 = "1.000000"
XBR_BLENDING = "0.000000"
BP = "-20.000000"
prescalex = "3.000000"
SIGMA_HB = "0.600000"
SIGMA_VB = "0.500000"
mask_bloom = "0.650000"
halation = "-0.300000"
gsl = "-1.000000"
scanline1 = "5.000000"
scanline2 = "7.000000"
h_sharp = "2.000003"
s_sharp = "1.000000"
ring = "1.500000"
TATE = "1.000000"
shadowMask = "10.000000"
maskstr = "1.000000"
maskboost = "1.599999"
mshift = "2.500000"
textures = "SamplerLUT1;SamplerLUT2;SamplerLUT3;SamplerLUT4"
SamplerLUT1 = "shaders_slang/crt/shaders/guest/advanced/lut/trinitron-lut.png"
SamplerLUT1_linear = "true"
SamplerLUT1_wrap_mode = "clamp_to_border"
SamplerLUT1_mipmap = "false"
SamplerLUT2 = "shaders_slang/crt/shaders/guest/advanced/lut/inv-trinitron-lut.png"
SamplerLUT2_linear = "true"
SamplerLUT2_wrap_mode = "clamp_to_border"
SamplerLUT2_mipmap = "false"
SamplerLUT3 = "shaders_slang/crt/shaders/guest/advanced/lut/nec-lut.png"
SamplerLUT3_linear = "true"
SamplerLUT3_wrap_mode = "clamp_to_border"
SamplerLUT3_mipmap = "false"
SamplerLUT4 = "shaders_slang/crt/shaders/guest/advanced/lut/ntsc-lut.png"
SamplerLUT4_linear = "true"
SamplerLUT4_wrap_mode = "clamp_to_border"
SamplerLUT4_mipmap = "false"
8 Likes

Is there a method to disable scanlines without using interlace? Some shaders (easymode, lottes-fast) allow this without side effects (e.g. image getting blurrier).

1 Like

Currently it’s not implemented, but there are some mechanisms in the shader which prevent brightness anomalies when removing scanlines with scanline parameters.

The only version with a fully capable vertical filter is the HD one and i can recommend it if you want to try some games without scanlines. Filtering using ‘laced’ mode can be tweaked separatelly for horizontal and vertical direction.

Ofc. these filtering options can’t smooth the image out like xBR, but it can be added instead of one of the stock shader.

Edit: maybe glow should be removed too in some situations, otherwise the image can look a bit smeared.

Edit2: i’ve implemented a no-scanline mode, it’s quite simple and fast:

Vertical sharpness can be controlled with scanline shape parameters…will probably make a new release version.

5 Likes

New Release Version (2022-10-23-r1):

Notable changes:

  • no-scanline mode added

Download link:

https://mega.nz/file/dlYWnLgT#IPbns42JLCZuqU6MQ24XsU9GIUfGnL_zTvCnIYZ14IY

8 Likes

Many thanks. I mostly need this for highres content with noninteger, and handhelds on certain displays. E.g. the LCD shaders seem a bit too unflexible for my purporse compared to CRT masks. I had a 480p LCD that somewhat reminded me of aperture grille:

3 Likes

New mode can look very nice even with low resolution content:

orlegend-221023-200014

After selecting the no-scanline mode, some tweaks might be required though, like gamma, scanline shape / gamma and brightboost.

3 Likes

Ok, so that behaviour is normal. I was wondering if there was something I was missing. I’ll play with some settings then.

1 Like

This is getting closer and closer to the way the original “Death To Pixels” cgp Shader Preset by @Birm looked, with the exception being that @Birm’s preset used a dot mask pattern rather than a slot mask pattern along with several other tweaks.

If myself or anyone else could recreate this look someday, I’d be a very happy camper.

2 Likes

That’s certainly looking nice. I think the only drawback being that if you look more closely at big white patches being fully lcd white with the mask completely gone it could break the experience a bit.

2 Likes

All the new changes are nice. xBR adds an almost anti-aliasing to text and images. Is it possible to use it on upscaled ps1 games? I can’t get it to work.

2 Likes

xBR is an upscaler. It takes low res and outputs high res. If the input is already high res, it can’t do anything.

2 Likes

Beetle PSX HW has built in xBR.

2 Likes

With the shader, for a scaler like xBR to have the desired effect, it’s scaling (in it’s pass) has to be greater than 1.0 and the Prescale-X parameter must match the scaling.

Otherwise emulators which allow texture enhancments and increased internal resolution have usually xBR or xBRZ texture scaling, like @Duimon mentioned.

2 Likes

Here trying with the guest shader new options etc.

With the native curvature this world ball is distortionated.

Other screenies with the same settings.

A flickering option in the shader would be very nice to see best the inmersion in the CRT screens, feel like literally.

Good advances thanks.

3 Likes

New Release Version (2022-10-25-r1):

Notable changes:

  • pre-scaler (xBR…) autodetect and auto-handling support added
  • pre-scale parameters removed (cheers)
  • edit: some parameter and code cleanup
  • edit2: cleanup, bugfix

Download link:

https://mega.nz/file/R5QEXSxR#f80YJOMekYUDiWYfzYxBCP3luFrVAiz1hCwmfXLT0Gk

15 Likes