New CRT shader from Guest + CRT Guest Advanced updates

I’m preparing for the ‘official’ release now. Some presets will be removed, but nothing dramatic. Also some very minor tweaks are involved, like afterglow threshold…

Nevertheless, i managed to add an anti-ringing option to the ntsc shaders which should mitigate the haloing quite significantly.

6 Likes

Here is my 4K HD settings and Images, if someone can help a bit you are welcome…

* shaders = "9"
* shader0 = "shaders_slang/crt/shaders/guest/hd/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/hd/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/hd/pre-shaders.slang"
* filter_linear2 = "true"
* wrap_mode2 = "clamp_to_border"
* mipmap_input2 = "false"
* alias2 = "PrePass"
* 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/hd/linearize-hd.slang"
* filter_linear3 = "true"
* wrap_mode3 = "clamp_to_border"
* mipmap_input3 = "false"
* alias3 = "LinearizePass"
* float_framebuffer3 = "true"
* 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/hd/crt-guest-advanced-hd-pass1.slang"
* filter_linear4 = "true"
* wrap_mode4 = "clamp_to_border"
* mipmap_input4 = "false"
* alias4 = "Pass1"
* float_framebuffer4 = "true"
* srgb_framebuffer4 = "false"
* scale_type_x4 = "viewport"
* scale_x4 = "1.000000"
* scale_type_y4 = "source"
* scale_y4 = "1.000000"
* shader5 = "shaders_slang/crt/shaders/guest/hd/bloom_horizontal.slang"
* filter_linear5 = "true"
* wrap_mode5 = "clamp_to_border"
* mipmap_input5 = "false"
* alias5 = ""
* float_framebuffer5 = "true"
* srgb_framebuffer5 = "false"
* scale_type_x5 = "absolute"
* scale_x5 = "640"
* scale_type_y5 = "source"
* scale_y5 = "1.000000"
* shader6 = "shaders_slang/crt/shaders/guest/hd/bloom_vertical.slang"
* filter_linear6 = "true"
* wrap_mode6 = "clamp_to_border"
* mipmap_input6 = "false"
* alias6 = "BloomPass"
* float_framebuffer6 = "true"
* srgb_framebuffer6 = "false"
* scale_type_x6 = "source"
* scale_x6 = "1.000000"
* scale_type_y6 = "absolute"
* scale_y6 = "480"
* shader7 = "shaders_slang/crt/shaders/guest/hd/crt-guest-advanced-hd-pass2.slang"
* filter_linear7 = "true"
* wrap_mode7 = "clamp_to_border"
* mipmap_input7 = "false"
* alias7 = ""
* float_framebuffer7 = "true"
* srgb_framebuffer7 = "false"
* scale_type_x7 = "viewport"
* scale_x7 = "1.000000"
* scale_type_y7 = "viewport"
* scale_y7 = "1.000000"
* shader8 = "shaders_slang/crt/shaders/guest/hd/deconvergence-hd.slang"
* filter_linear8 = "true"
* wrap_mode8 = "clamp_to_border"
* mipmap_input8 = "false"
* alias8 = ""
* float_framebuffer8 = "false"
* srgb_framebuffer8 = "false"
* scale_type_x8 = "viewport"
* scale_x8 = "1.000000"
* scale_type_y8 = "viewport"
* scale_y8 = "1.000000"
* CP = "5.000000"
* TNTC = "4.000000"
* wp_saturation = "1.699999"
* vigdef = "0.500000"
* GAMMA_INPUT = "2.200000"
* intres = "1.000000"
* spike = "2.000000"
* SIGMA_HB = "0.400000"
* SIGMA_VB = "0.400000"
* bloom = "0.150000"
* mask_bloom = "0.500000"
* bloom_dist = "0.700000"
* halation = "0.100000"
* gamma_c = "0.760000"
* brightboost = "1.250000"
* brightboost1 = "1.250000"
* gsl = "1.000000"
* scanline1 = "5.500000"
* scanline2 = "20.000000"
* beam_size = "0.650000"
* scans = "1.400001"
* scangamma = "2.500000"
* shadowMask = "10.000000"
* maskstr = "1.000000"
* mcut = "2.000000"
* masksize = "2.000000"
* mask_gamma = "2.500000"
* slotmask = "1.000000"
* slotmask1 = "1.000000"
* slotwidth = "8.000000"
* double_slot = "3.000000"
* mclip = "1.000000"
* gamma_out = "2.499999"
* deconrr = "-1.250000"
* deconrb = "1.250000"
* deconrry = "-1.250000"
* deconrby = "1.250000"
* post_br = "1.100000"
* 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"
2 Likes

I mean it depends on what you’re going for. If you want it to look more realistic then you’ll want to kill the glow and bloom completely.

If you’re not that concerned with realism, then it looks fine as is.

1 Like

I want realism, but I thought that bloom is for slotmask.

Looks great! Just wanted to share a little tip concerning sharing presets.

You might want to select all the text and remove the “Bulleted List” formatting and instead select the entire block of parameters and click the icon to the right of the " which looks like a less than sign, then a forward slash, followed by a greater than sign. If you hover over it it will say “Preformatted text (Ctrl+Shift+C)”.

Realism is relative. It can be as realistic as you want it to be. I think what @Nesguy is referring to is accurate to the way a CRT generates the image and looks down to the phosphor level.

From a normal distance your preset might look virtually indistinguishable from a real CRT despite using “tricks” that were never present on a real CRT that on close inspection wouldn’t be seen anywhere on a CRT.

3 Likes

You mean this?..

1 Like

I mean like this:

RetroGames4K Realistic Virtual Sanyo SlotMask CRT

shaders = “9”
shader0 = “shaders_slang/crt/shaders/guest/hd/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/hd/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/hd/pre-shaders.slang”
filter_linear2 = “true”
wrap_mode2 = “clamp_to_border”
mipmap_input2 = “false”
alias2 = “PrePass”
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/hd/linearize-hd.slang”
filter_linear3 = “true”
wrap_mode3 = “clamp_to_border”
mipmap_input3 = “false”
alias3 = “LinearizePass”
float_framebuffer3 = “true”
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/hd/crt-guest-advanced-hd-pass1.slang”
filter_linear4 = “true”
wrap_mode4 = “clamp_to_border”
mipmap_input4 = “false”
alias4 = “Pass1”
float_framebuffer4 = “true”
srgb_framebuffer4 = “false”
scale_type_x4 = “viewport”
scale_x4 = “1.000000”
scale_type_y4 = “source”
scale_y4 = “1.000000”
shader5 = “shaders_slang/crt/shaders/guest/hd/bloom_horizontal.slang”
filter_linear5 = “true”
wrap_mode5 = “clamp_to_border”
mipmap_input5 = “false”
alias5 = “”
float_framebuffer5 = “true”
srgb_framebuffer5 = “false”
scale_type_x5 = “absolute”
scale_x5 = “640”
scale_type_y5 = “source”
scale_y5 = “1.000000”
shader6 = “shaders_slang/crt/shaders/guest/hd/bloom_vertical.slang”
filter_linear6 = “true”
wrap_mode6 = “clamp_to_border”
mipmap_input6 = “false”
alias6 = “BloomPass”
float_framebuffer6 = “true”
srgb_framebuffer6 = “false”
scale_type_x6 = “source”
scale_x6 = “1.000000”
scale_type_y6 = “absolute”
scale_y6 = “480”
shader7 = “shaders_slang/crt/shaders/guest/hd/crt-guest-advanced-hd-pass2.slang”
filter_linear7 = “true”
wrap_mode7 = “clamp_to_border”
mipmap_input7 = “false”
alias7 = “”
float_framebuffer7 = “true”
srgb_framebuffer7 = “false”
scale_type_x7 = “viewport”
scale_x7 = “1.000000”
scale_type_y7 = “viewport”
scale_y7 = “1.000000”
shader8 = “shaders_slang/crt/shaders/guest/hd/deconvergence-hd.slang”
filter_linear8 = “true”
wrap_mode8 = “clamp_to_border”
mipmap_input8 = “false”
alias8 = “”
float_framebuffer8 = “false”
srgb_framebuffer8 = “false”
scale_type_x8 = “viewport”
scale_x8 = “1.000000”
scale_type_y8 = “viewport”
scale_y8 = “1.000000”
CP = “5.000000”
TNTC = “4.000000”
wp_saturation = “1.699999”
vigdef = “0.500000”
GAMMA_INPUT = “2.200000”
intres = “1.000000”
spike = “2.000000”
SIGMA_HB = “0.400000”
SIGMA_VB = “0.400000”
bloom = “0.150000”
mask_bloom = “0.500000”
bloom_dist = “0.700000”
halation = “0.100000”
gamma_c = “0.760000”
brightboost = “1.250000”
brightboost1 = “1.250000”
gsl = “1.000000”
scanline1 = “5.500000”
scanline2 = “20.000000”
beam_size = “0.650000”
scans = “1.400001”
scangamma = “2.500000”
shadowMask = “10.000000”
maskstr = “1.000000”
mcut = “2.000000”
masksize = “2.000000”
mask_gamma = “2.500000”
slotmask = “1.000000”
slotmask1 = “1.000000”
slotwidth = “8.000000”
double_slot = “3.000000”
mclip = “1.000000”
gamma_out = “2.499999”
deconrr = “-1.250000”
deconrb = “1.250000”
deconrry = “-1.250000”
deconrby = “1.250000”
post_br = “1.100000”
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

Cita Ok Got it… I just Changed it…

1 Like

It still has the * before each line, to remove those select the whole block of settings then click or tap on the “Bulleted List” formatting icon or users are going to have to delete all those * from the preset before they can use it.

I’m not sure about the Glow but doesn’t having Mclip at 1.000000 effectively kill all the bloom?

Yeah, I understand what you mean. And I’m aware that each piece of hardware had it’s quirks, CRT included. I admire how you guys go so deep into it and prepare very specific shaders and presets, but I don’t want to go down that rabbit hole. I really just want something barebones with minimum customization.

Guest’s slotmask presets already look great for me. A slotmask with visible triads and NTSC dedithering is all I need. The only thing that was bothering me was brightness and gamma tracking, which did not seem accurate to me. Then, as I kept experimenting to fix them, I shared those ringing problems here.

But in the end I believe I’ve arrived at a satisfactory result. I’ll make sure to share it later.

I wish I could, but I don’t have HDR on Linux yet, and increasing my TV’s brightness in SDR mode each time I open RetroArch is not practical. For now I’ll use Guest’s lovely shader :slightly_smiling_face:

That would be lovely! I’ll try it as soon as you release it. :slightly_smiling_face:

1 Like

And here it is. I believe I’m tracking gamma and saturation pretty accurately with this preset.

NTSC-Adaptive reference image:

My preset, based on Guest NTSC:

It’s not perfect. We can see that the darker column is a bit brighter than it should be, and the midrange should be ever so slightly brighter than it is, but I’m satisfied for now.

Furthermore, I had to raise Gamma Out a lot and I’m afraid of raising it more. I already had to reduce Glow to 0.01 because of that and I don’t know what else I might be breaking. What other parameters should I check because of such a big Gamma Out increase other than Glow?

Anyway, here’s the preset:

#reference "../crt/guest-advanced/crt-guest-advanced-ntsc.slangp"
quality = "0.000000"
ntsc_sharp = "-8.000000"
interm = "3.000000"
shadowMask = "12.000000"
maskstr = "1.000000"
slotmask = "1.000000"
slotmask1 = "1.000000"
slotwidth = "7.000000"
double_slot = "3.000000"
glow = "0.010000"
bloom = "0.800000"
halation = "0.050000"
brightboost = "1.000000"
brightboost1 = "1.000000"
mclip = "0.000000"
gamma_out = "2.800000"
post_br = "1.100000"

Oh, and Mario lost most of it’s exaggerated NTSC magical aura!

I’m open to criticism! :smile:

4 Likes

Ok Guys, this is the setting for the advanced version for the Mega Drive. If you like it, I’ll post the settings. Here are some pics :grin:

4 Likes

@guest.r, If possible, incorporate the “glass” effect into your shader, as it’s an option that helps increase the realism of a CRT TV simulation.

I think it’s a very welcome addition.

Thanks.

2 Likes

You can get that today with HSM Mega Bezel Reflection Shader which uses CRT-Guest-Advanced as its default shader.

4 Likes

New Release Version (2022-07-27-r1):

Notable changes:

  • ntsc anti-ringing option added (reduces halo ‘auras’)
  • hires version removed - is succeeded by HD version
  • ntsc-fast version removed - standard ntsc version got about 50% faster in later releases, fast version was only 20% faster compared with normal
  • afterglow effects added to HD version
  • bloom/glow resolution improved with non-standard versions
  • some small afterglow tweaks

Download link:

https://mega.nz/file/t4JlzISC#8FqqbBnVexxQDhk-o6THW_6US32zSun3cwfws7m2EbU

15 Likes

thx very much for the release

1 Like

It’s easy to test which is faster. In Settings->Frame Throttle, set Fast-Forward Frameskip to OFF and Fast-Forward rate to 0.0x, and then simply see which of the two cases give the highest fast-forward FPS while the game is paused in the same spot (best way to do this is to pause the game and do a save state that you then load to compare the different settings.)

1 Like

All steps of every color in that image are distinct on my display. So I would say either the gamma setting of your display is set wrongly, or you’re using some monitor preset that is not neutral (some displays come with “gaming”, “movies” etc presets that ruin the color accuracy.)

Just in case people didn’t know, you don’t have to rely on how retroarch saves presets. After you save the core preset (for example for Snes9x it would be called Snes9x.slangp), and then a game preset where you only want a few settings to be different (for example 'Final Fantasy III (USA).slangp'), you can just edit the game preset to reference the core preset. My 'Final Fantasy III (USA).slangp' for example looks like this:

#reference "Snes9x.slangp"
overscanX = "21.000000"
overscanY = "16.000000"

This loads the Snes9x preset and only changes the overscan settings. This makes it much more convenient to have per-game presets, since you don’t have to update all your game presets when you change a setting that you want to be common for all games.

4 Likes

It doesn’t “ruin” it. Yes, it doesn’t blend completely, but compare it to how it looks compared to the raw image. There’s still partial blending going on. Also, there’s photos of CRTs out there that do the same thing. They produce a sharper image that does look very similar to how this shader looks with increased NTSC res.

2 Likes