New CRT shader from Guest + CRT Guest Advanced updates

Even more amazing. I set the hum bar settings to give it a faint flicker. The preset may be my most lossless (color closest to raw) to date. It’s sharp as glass (partly thanks to Glow ironically creating the illusion of a darker black level) and sometimes too bright (hurt my eyes a bit playing Iridion 3D). The preset seem content to be worn by the game instead of the other way around, and I find myself compelled to appreciate the spritework instead of the pixels. To top it all off the image is true to my memory.

Copy it to a txt and rename it to a slang file. Give it a whirl, it’s not like you have anything to lose. (EDIT: actually it’s designed for 4k, so if that’s not your res you might want to set mask size to 1 and maybe cut deconvergence in half.)

In my current setup, however, differs in that I have the deconvergenceses set 4.50, -4.50, 4.50. The above preset is has those set to 3,-3,3.

Once I’m confident I everything where I want it I’ll try to make an equivalent in the regular version and post both to the “show off” thread.

I’m considering switching from mask 8 to 9 or -1. Do you guys have any opinion on that?

2 Likes

I just noticed that I was working with an outdated version of the NTSC shader (even though I knew the newer version existed). And that NTSC resolution was set 0.80 held over from experiments with its relation to artifacts.

I’ve ported over my setup to the newer NTSC shader… And noticed that I have to recalibrate the gamma again to achieve “lossless”.

Which so far seems to surprisingly amount to resetting a few things back to default. nice job @guest.r.

EDIT: Resetting a few things… then changing a bunch of others. End result seems to bring the “losslessness” of the above preset to shame.

EDIT AGAIN: Scratch that! Oh boy, this might take a while. Sorry, normally when I get good results in the [cough] “chicken-neckwear” [cough] image I use to calibrate skin tones and interlacing it translates very well into everything else. Not this time.

3 Likes

Would it be possible to get the NTSC Fast version of this in gl so i can run it on the switch?

It’s been flawless on my PC and im just curious if there’s a way to get it on switch.

1 Like

The best way would be to use an existing GLSL preset, newer versions can’t be trivially ported from slang to GLSL, mostly because of power of 2 texture sizes.

1 Like

@guest.r

I don’t think the latest download version includes the preset for NTSC. Thanks for the updates!

2 Likes

Yes, the shaders in the ‘crt’ folder need also to be updated and the preset from ‘presets’ used to use this one.

3 Likes

Hi everyone, I’ve been experimenting for a while with the vanilla advanced version (great work, guest!). 1440p, integer scale off. I’m aiming for a somewhat morbid and glowy look (but not composite/s-video NTSC), but it’s still a WIP. Here’s some screenshots, I’ve pimped glow (0.20), bloom (0.10) and halation (0.10), reduced horizontal sharpness (2.0, with substractive sharpness set to 1.0) and choose mask 8 (not that I particularly understand the differences between the Trinitrons, please someone explain). No interlacing. I’ve also adjusted the darkness of both light and dark scanlines, but just a tad (like 0.10 more). It still seems something’s off, I’m open to every advice.

5 Likes

Ok, I have a question: is it possibile to add the three settings of glow, bloom and halation of crt-guest-advanced to another shader by adding a specific pass, or are they included elsewhere, like in the code or God knows where (I’m not a master in stacking shaders, forgive me if the question sounds weird)?

2 Likes

The different components are typically interwoven in such a way that you can’t add them purely through pass/preset mojo. That is, the passes themselves will work but they store the blurred result in a framebuffer that gets added back into the main CRT effect in its code.

7 Likes

Crystal clear, thank you!

5 Likes

The artifacts option brings something similar to the Mega Drive rainbow effect. I thought it was wonderful! However, I wonder if it’s possible to omit this horizontal artifact and just use the rainbow effect?

3 Likes

It’s possible if you use the ‘custom’ ntsc mode, in which you set fringing to 0.0. Ofc. custom artifacting should be increaed to a greater value.

5 Likes

We can now do our own HDR tonemapping, just FYI: https://github.com/libretro/RetroArch/commit/9151326b73d7bf0be7eccfbdd8513dc1f34719aa

8 Likes

I got the time and opportunity to try it out and it really works great, simplifying the HDR concept a lot. Tested it with some games and presets and it became a preferred experience. Since HDR implementation really varies from display to display (mine is like 430 sdr / 520 hdr nits) i added a brightness variable in the last pass to better customize the experience.

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

Notable changes:

  • added a brightness control variable to better adjust the HDR effect.
  • finer tuning of rolling scanlines
  • ntsc preset included again along with other presets

Download link:

https://mega.nz/file/094UgbBR#ZAxqX4HUdO8WviF4f-rSFjfUgCxbbqir1ugGNL8Wcv0

13 Likes

@guest.r @HyperspaceMadness If I apply the new Guest version, will it break the MegaBezel? (I have the latest version 01/05 Rev2)
Thank you

3 Likes

The Mega Bezel uses an internally adapted version of Guest’s shader, it does not reference his stand-alone.

I will assume that, after some testing, HSM will update the internal version.

(He and I both have HDR displays, albeit HDR10.)

4 Likes

I wanted to ask, would it be possible for you to move the two parameters “Afterglow Strength” and “Afterglow Saturation” from the “pre-shaders-afterglow.slang” and place them into the “afterglow0.slang” file? I ask because I noticed on my last custom guest shader preset when I replaced the “pre-shaders-afterglow0” pass with “grade” both “afterglow strength” and “afterglow saturation” dissapeared when I go into the parameters. With those two parameters no longer there I noticed the first shader pass “afterglow0” parameters (persistence red, persistence green, persistence blue) displayed a more intense afterglow hence the reason I turned those 3 parameters down from their default value of 32 to 8. Yet I still notice the afterglow is still kind of strong even if I turn all 3 of those parameters down to 0 in my preset. I notice this the most on nes games, perfect example is Castlevania the first stage, soon as you start walking the trees in the background light up really strong with the glow, this doesn’t happen in the vanilla crt-guest-advanced-ntsc shader which my preset is based off, only in mines does that happen since I’m missing those two parameters from the “pre-shaders-afterglow0” pass that ended up getting replaced for the “grade” pass. Is there anything that can be done to include just those two parameters into the “afterglow0” slang file so that the afterglow can display the way it’s suppose to?

2 Likes

Thanks for mentioning it. It will be fixed in the next release.

2 Likes

Nice. I’ll be looking forward to it.

1 Like

Oops, i seem to misjudge the situation a bit. It sounded like grade had an afterglow handling, but didn’t find any. The mentioned parameters can’t be put backwards unfortunately.

But i can post the presets with more stock shaders, so there is room for grade also:

crt-guest-advanced.slangp

shaders = 13

shader0 = shaders/guest/advanced/stock.slang
filter_linear0 = false
scale_type0 = source
scale0 = 1.0

shader1 = shaders/guest/advanced/stock.slang
filter_linear1 = false
scale_type1 = source
scale1 = 1.0

shader2 = shaders/guest/advanced/stock.slang
filter_linear2 = false
scale_type2 = source
scale2 = 1.0
alias2 = StockPass

shader3 = shaders/guest/advanced/afterglow0.slang
filter_linear3 = false
scale_type3 = source
scale3 = 1.0
alias3 = AfterglowPass

shader4 = shaders/guest/advanced/pre-shaders-afterglow.slang
filter_linear4 = false
scale_type4 = source
mipmap_input4 = true
scale4 = 1.0
alias4 = PrePass

textures = "SamplerLUT1;SamplerLUT2;SamplerLUT3;SamplerLUT4"
SamplerLUT1 = shaders/guest/advanced/lut/trinitron-lut.png
SamplerLUT1_linear = true
SamplerLUT2 = shaders/guest/advanced/lut/inv-trinitron-lut.png
SamplerLUT2_linear = true
SamplerLUT3 = shaders/guest/advanced/lut/nec-lut.png
SamplerLUT3_linear = true
SamplerLUT4 = shaders/guest/advanced/lut/ntsc-lut.png
SamplerLUT4_linear = true 

shader5 = shaders/guest/advanced/avg-lum.slang
filter_linear5 = true
scale_type5 = source
scale5 = 1.0
mipmap_input5 = true
alias5 = AvgLumPass

shader6 = shaders/guest/advanced/linearize.slang
filter_linear6 = true
scale_type6 = source
scale6 = 1.0
alias6 = LinearizePass
float_framebuffer6 = true

shader7 = shaders/guest/advanced/gaussian_horizontal.slang
filter_linear7 = true
scale_type_x7 = absolute
scale_x7 = 800.0
scale_type_y7 = source
scale_y7 = 1.0 
float_framebuffer7 = true

shader8 = shaders/guest/advanced/gaussian_vertical.slang
filter_linear8 = true
scale_type_x8 = absolute
scale_x8 = 800.0
scale_type_y8 = absolute
scale_y8 = 600.0
float_framebuffer8 = true
alias8 = GlowPass

shader9 = shaders/guest/advanced/bloom_horizontal.slang
filter_linear9 = true
scale_type_x9 = absolute
scale_x9 = 800.0
scale_type_y9 = absolute
scale_y9 = 600.0 
float_framebuffer9 = true

shader10 = shaders/guest/advanced/bloom_vertical.slang
filter_linear10 = true
scale_type_x10 = source
scale_x10 = 1.0
scale_type_y10 = source
scale_y10 = 1.0
float_framebuffer10 = true
alias10 = BloomPass

shader11 = shaders/guest/advanced/crt-guest-advanced.slang
filter_linear11 = true
scale_type11 = viewport
scale_x11 = 1.0
scale_y11 = 1.0

shader12 = shaders/guest/advanced/deconvergence.slang
filter_linear12 = true
scale_type12 = viewport
scale_x12 = 1.0
scale_y12 = 1.0 

crt-guest-advanced-ntsc.slangp

shaders = 18

shader0 = shaders/guest/advanced/stock.slang
filter_linear0 = false
scale_type0 = source
scale0 = 1.0

shader1 = shaders/guest/advanced/stock.slang
filter_linear1 = false
scale_type1 = source
scale2 = 1.0

shader2 = shaders/guest/advanced/stock.slang
filter_linear2 = false
scale_type2 = source
scale2 = 1.0
alias2 = StockPass

shader3 = shaders/guest/advanced/afterglow0.slang
filter_linear3 = true
scale_type3 = source
scale3 = 1.0
alias3 = AfterglowPass

shader4 = shaders/guest/advanced/pre-shaders-afterglow.slang
filter_linear4 = true
scale_type4 = source
scale4 = 1.0
alias4 = PrePass0 

textures = "SamplerLUT1;SamplerLUT2;SamplerLUT3;SamplerLUT4"
SamplerLUT1 = shaders/guest/advanced/lut/trinitron-lut.png
SamplerLUT1_linear = true
SamplerLUT2 = shaders/guest/advanced/lut/inv-trinitron-lut.png
SamplerLUT2_linear = true
SamplerLUT3 = shaders/guest/advanced/lut/nec-lut.png
SamplerLUT3_linear = true
SamplerLUT4 = shaders/guest/advanced/lut/ntsc-lut.png
SamplerLUT4_linear = true 

# custom ntsc shaders

shader5 = shaders/guest/advanced/ntsc/ntsc-pass1.slang
shader6 = shaders/guest/advanced/ntsc/ntsc-pass2.slang

filter_linear5 = false
filter_linear6 = true

scale_type_x5 = source
scale_type_y5 = source
scale_x5 = 4.0
scale_y5 = 1.0
frame_count_mod5 = 2
float_framebuffer5 = true

scale_type6 = source
scale_x6 = 0.5
scale_y6 = 1.0

shader7 = shaders/guest/advanced/custom-fast-sharpen.slang
filter_linear7 = true
scale_type7 = source
scale_x7 = 1.0
scale_y7 = 1.0
alias7 = NtscPass

shader8 = shaders/guest/advanced/convert-ntsc.slang
filter_linear8 = true
scale_type8 = source
scale_x8 = 0.5
scale_y8 = 1.0

shader9 = shaders/guest/advanced/stock.slang
filter_linear9 = true
scale_type9 = source
scale_x9 = 1.0
scale_y9 = 1.0
alias9 = PrePass 
mipmap_input9 = true

shader10 = shaders/guest/advanced/avg-lum-ntsc.slang
filter_linear10 = true
scale_type10 = source
scale10 = 1.0
mipmap_input10 = true
alias10 = AvgLumPass

shader11 = shaders/guest/advanced/linearize-ntsc.slang
filter_linear11 = true
scale_type11 = source
scale11 = 1.0
alias11 = LinearizePass
float_framebuffer11 = true

shader12 = shaders/guest/advanced/gaussian_horizontal.slang
filter_linear12 = true
scale_type_x12 = absolute
scale_x12 = 640.0
scale_type_y12 = source
scale_y12 = 1.0 
float_framebuffer12 = true

shader13 = shaders/guest/advanced/gaussian_vertical.slang
filter_linear13 = true
scale_type_x13 = absolute
scale_x13 = 640.0
scale_type_y13 = absolute
scale_y13 = 480.0
float_framebuffer13 = true
alias13 = GlowPass

shader14 = shaders/guest/advanced/bloom_horizontal.slang
filter_linear14 = true
scale_type_x14 = absolute
scale_x14 = 640.0
scale_type_y14 = absolute
scale_y14 = 480.0 
float_framebuffer14 = true

shader15 = shaders/guest/advanced/bloom_vertical.slang
filter_linear15 = true
scale_type_x15 = absolute
scale_x15 = 640.0
scale_type_y15 = absolute
scale_y15 = 480.0
float_framebuffer15 = true
alias15 = BloomPass 

shader16 = shaders/guest/advanced/crt-guest-advanced-ntsc.slang
filter_linear16 = true
scale_type16 = viewport
scale_x16 = 1.0
scale_y16 = 1.0

shader17 = shaders/guest/advanced/deconvergence.slang
filter_linear17 = true
scale_type17 = viewport
scale_x17 = 1.0
scale_y17 = 1.0
2 Likes