New CRT shader from Guest + CRT Guest Advanced updates

I think the preset looks a bit better than the last time I saw it. That was before guest.r revamped deconvergence and a few other effects so it must have something to do with it.

The preset is for 2K 1440P so you can manually set your viewport to something like 1792x1344 or 1920x1440 first and make sure if you like the pattern. If you do, you can start messing around with different mask sizes to make it work for 4K. (integer scale required)

original attempt:

shaders = "12"
shader0 = "shaders_slang/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/stock.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 = "1.000000"
scale_type_y1 = "source"
scale_y1 = "1.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 = "false"
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"
shadowMask = "11.000000"
maskstr = "0.750000"
slotmask = "0.350000"
slotmask1 = "1.000000"
slotwidth = "3.000000"
double_slot = "2.000000"
mclip = "0.000000"
deconrr = "0.500000"
deconrg = "-0.500000"
deconrb = "1.000000"
deconrry = "-1.000000"
deconrgy = "1.500000"
deconrby = "-1.500000"
decons = "1.500002"
deconsmooth = "0.700000"
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"

sharpened: (I like this one better)

shaders = "13"
shader0 = "shaders_slang/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/crt/shaders/guest/advanced/stock.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 = "1.000000"
scale_type_y1 = "source"
scale_y1 = "1.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 = "false"
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"
shader12 = "shaders_slang/sharpen/shaders/fast-sharpen.slang"
wrap_mode12 = "clamp_to_border"
mipmap_input12 = "false"
alias12 = ""
float_framebuffer12 = "false"
srgb_framebuffer12 = "false"
AS = "0.000000"
sat = "0.000000"
WP = "-35.000000"
glow = "0.020000"
bloom = "0.200000"
halation = "0.050000"
brightboost = "3.499998"
brightboost1 = "1.350000"
gsl = "2.000000"
scanline1 = "5.000000"
scanline2 = "6.000000"
beam_min = "1.100000"
beam_max = "0.800000"
vertmask = "-0.500000"
scans = "0.800000"
spike = "0.000000"
h_sharp = "4.000001"
s_sharp = "0.400000"
shadowMask = "10.000000"
maskstr = "0.850000"
mcut = "1.400000"
maskLight = "2.000000"
slotmask = "0.350000"
slotmask1 = "1.000000"
slotwidth = "3.000000"
double_slot = "2.000000"
mclip = "0.200000"
gamma_out = "2.250000"
deconrr = "-0.500000"
deconrg = "0.500000"
deconrb = "-1.000000"
deconrry = "1.000000"
deconrgy = "-1.500000"
deconrby = "1.500000"
decons = "-2.000002"
deconsmooth = "0.300000"
noiseresd = "3.000000"
SHARPEN = "2.000000"
CONTR = "0.250000"
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"
1 Like

Tried your original one, but it seems you have a lot of black crush there, and also some weird artifacts. Do you also see this on your side?

1 Like

When transferring an older preset to the newest version just save a new preset with the new version and then copy the parameter values into it (after the already existing stuff). Otherwise some things might not work as intended.

Here are the parameter values (for example) to copy and paste:

AS = "0.000000"
sat = "0.000000"
WP = "-35.000000"
glow = "0.020000"
bloom = "0.200000"
halation = "0.050000"
brightboost = "3.499998"
brightboost1 = "1.350000"
gsl = "2.000000"
scanline1 = "5.000000"
scanline2 = "6.000000"
beam_min = "1.100000"
beam_max = "0.800000"
vertmask = "-0.500000"
scans = "0.800000"
spike = "0.000000"
h_sharp = "4.000001"
s_sharp = "0.400000"
shadowMask = "10.000000"
maskstr = "0.850000"
mcut = "1.400000"
maskLight = "2.000000"
slotmask = "0.350000"
slotmask1 = "1.000000"
slotwidth = "3.000000"
double_slot = "2.000000"
mclip = "0.200000"
gamma_out = "2.250000"
deconrr = "-0.500000"
deconrg = "0.500000"
deconrb = "-1.000000"
deconrry = "1.000000"
deconrgy = "-1.500000"
deconrby = "1.500000"
decons = "-2.000002"
deconsmooth = "0.300000"
noiseresd = "3.000000"
SHARPEN = "2.000000"
CONTR = "0.250000"
3 Likes

You can take a look at what you can do with Mask 6 at 1080p in these presets. There are several settings you can adjust to make things brighter, for example, Bloom, Mask Gamma, Mask Strength, Gamma, CRT Gamma - In, CRT Gamma Out and Post-CRT Brightness. A touch of Halation can also go a long way.

These were all designed and tested on a 4K LG TV.

Feel free to look at them as well @nfp0.

1 Like

I’ll take a look. Thanks!

1 Like

Still shows the same problems. I presume @crtJoe’s preset was already on the latest version.

But thanks for the help!

1 Like

Yeah, but maybe with one difference which is causing the issues:

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 = "false"

With this pass float_framebuffer changed to “true”. Without float framebuffer enabled there are issues like black crush and other artifacts.

That’s why it’s important to update the presets also, not only the shader files.

5 Likes

Ah makes sense! I’ll try it as soon as I can. Thank you!

2 Likes

Some people were asking why a black and white mask looks comparing an LG C1 Oled to the qn90a QLed. Here are two shots with the same shader settings. I could have better separation of phosphors if I upped the mask from 90 to 100. I like the colors more on the qn90a but they are close enough you could tweak the shader settings to be nearly identical and I wouldn’t be able to tell the difference.

7 Likes

Which one is the OLED? Both look good.

2 Likes

OLED is the first one.

2 Likes

I thought so when I saw them. Notice how much more detail can be seen in the dark areas and of course in the bright areas the colors aren’t as oversaturated as on the LCD. So there’s your contrast advantage at play right there and it applies to everything. Add to that no blooming and light bleed and those are some of the features that make OLED special.

2 Likes

What settings are you using here? Looks good

1 Like

@guest.r I recently posted some presets using your integrated integer scaling parameter but I noticed something when I load up any game that has interlacing in it, for some reason the screen crops off more picture than it normally would on non interlaced games. Here’s an example, the playstation start up screen with no integer scaling set to 0:

Retro-Arch-20220326-101532

It’s normal and the way it’s suppose to look but then I switch it to 3 and it looks like this:

Retro-Arch-20220326-101628

It’s as if the image gets cropped vertically twice over or something. Same thing when I switch to 4:

Retro-Arch-20220326-101706

Is that how the integer scale settings 3 and 4 suppose to look on interlaced content?

1 Like

Yeah, each vertical resolution is processed differently with integer scaling. The greater it gets, more chance for loosing too much lines or get too much cropping. Bigger display resolution helps a lot here.

For example, with 200 vertical pixels and 1080p, a multiplier of 6x is used, means a ‘virtual resolution’ of 1200px, 120 output or 20 native pixels are not shown or 10%.

With 480 native vertical pixels and 1080p, a multiplier of 3x is used, meaning ‘virtual resolution’ of 1440, 360 output or 120 native pixels are not shown, meaning 25%.

But it’s a nice idea to disable integer scaling with laced screens, it’s not this hard to implement.

1 Like

I see, everything is mathematics and numbers when it comes to this. And yes that idea you suggested would be great, I was going crazy trying to figure out why the screen was stretching so much lol

1 Like

New Release Version (2022-03-26-r1):

Notable changes:

  • integer scaling not used with interlaced modes / interlacing

Download link:

https://mega.nz/file/khRBgJLa#KaILpAw98VnhMwEjv-Ky7g7Kru1RpVuF9ts01yUqh_w

7 Likes

Nice, let me check this out right quick.

2 Likes

@guest.r, please, always inform us when is only necessary copy the new files or copy and create a new preset.

1 Like

It’s a self-sustained edition since a long ago, copy-paste into crt folder friendly. I would suggest to always copy paste from the root of the included folder, including presets.

This specific version only changes the shader files though.

Edit: a problem that happens is that older saved preset need a refresh since new ‘deconvergence’ implementation, because pass before the last pass needs float framebuffer enabled.

2 Likes