New CRT shader from Guest + CRT Guest Advanced updates

Yeah, i tried this first, but it doesn’t work well with blending mode 0.0, and the text is somewhat smeared with 2.0. But i’m glad you now have something to improve the experience.

1 Like

Yeah I’ve tried playing with that parameter, turning it up to 75 makes bright interlaced content look better but then everything else looks bad. I just can’t seem to find a sweet spot with mask 9 using slotmask. At least your last preset post gave me something to improve my other slotmask preset that I’ll be posting eventually so thank you for that.

2 Likes

You might also take another mask strategy. This involves manually adjusting mask strengths for dark and bright colors, maybe using more halation than bloom as bloom is filling the mask quicker.

With this approach you can tune the mask appearance with mask gamma, which can be very useful on depending what you want to achieve.

4 Likes

I have absolutely no idea about this shader but what I will say is that when I searched for the ‘#pragma format’ in the shader source repository I’m not sure I saw a HDR format output buffer for most shaders and as such any rec.2020 gamut would get lost.

But again I have no idea whether this is still true or what the intention here is.

I messed around with mask strengths, bloom, halation and the clipping parameter, I just can’t seem to hit a sweet spot. I’m trying to achieve a preset with the settings I used in the post a few posts above while getting the mask not to look so bulky when it’s on bright screens during interlaced images. @guest.r I was wondering if you could try adjust my preset above while still keeping the overall look the same. I’m just about ready to give up on it, was trying all night last night lol

2 Likes

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

Notable changes:

  • bloom saturation is now tuned for better appearance with full strength masks
  • bloom distribution parameter added (default == 0.0 == old behavior)
  • deconvergence smoothing reworked for a new purpose (@sonkun…) (standard, ntsc, hires, hd versions)
  • Edit: deconvergence smoothing range increased for double sized masks (4k…)

Download link:

https://mega.nz/file/YkIwiJRJ#-_r40CXGhaL1yuhZqO8uL7PjI5vWigdmrc-N8bVaOvg

You can try to use the reworked deconvergence smoothing, otherwise it’s quite hard to get this specific look without it.

12 Likes

Hi guest,

when using HDR (400+ nits) what would you suggest is the minimum “Bright Boost Dark Pixels” value? Should it be able to be lowered to 1 with HDR or would there be a minimum low value for this? I’m finding that Bright Boost Dark Pixels between 1.2 and 1.3 seems to be the minimum it needs to be at? Is it because of the Beam dynamics this needs to be positive even when using HDR?

You did it once again my man, this update solved my issue. That bloom distribution parameter is a beautiful welcome addition, soon as I turned that up the colors began to pop and look more rich across the screen. I didn’t even have to touch the deconvergence smoothing, everything just worked by default. I’m off to update my previous preset asap, catch me in the show off your shaders thread real soon, I got something nice and new coming for everybody. Thank you once again for the number 1 shader on Retroarch.

7 Likes

It’s imo very dependent from other parameters too, like mask setup, scanlines etc. My procedure is to take an already tweaked normal preset, run the 240p test rom and adjust the hdr parameters (primarily contrast, maybe paper white luminance, peak luminance is more or less to be set as it is with your display). Fine tweaking can be made with shader parameters.

A ‘hdr’ preset of mine uses BrightBoost Dark of 1.5 and gamma correct 1.3…BrightBoost values are not as effective as they seem, :smiley: effectivness compared with regular gamma space is to be calulated with pow( brightboost value, 1.0/gamma).

No problem, @sonkun, i’m also glad you contributed to some nice changes with the shader. Currently i’m happy how the recent updates turned out, i’m using new functionalities quite frequently when mixing a preset.

5 Likes

Thank you, we’re coming a long way with this shader and it’s only getting better with each update. I’m satisfied with my preset for now, I also love when you post your presets because they always give me a blueprint to base my presets on, it’s a perfect trade off. If you ever come up with another slot mask preset please do post it here.

3 Likes

As ‘promised’ 2 new masks are now included, also kudoz to @GPDP1 for clever thinking. Mask 9 works very well on a 1440p display, mask 10 (rgb-black is a nice 1440p/4k mask).

I tuned a mask 9 + slotmask preset, including some new features.

here are the parameters to copy into an existing ‘crt-guest-advanced’ preset:

CS = "2.000000"
TNTC = "1.000000"
WP = "-65.000000"
SIZEHB = "3.000000"
SIGMA_HB = "0.750000"
SIZEVB = "3.000000"
SIGMA_VB = "0.750000"
bloom = "0.700000"
bloom_dist = "2.000000"
halation = "0.100000"
brightboost = "1.600001"
gsl = "-1.000000"
scanline1 = "5.500000"
scanline2 = "7.000000"
beam_min = "1.100000"
beam_max = "0.950000"
beam_size = "0.750000"
vertmask = "-0.600000"
scans = "1.150000"
scan_falloff = "0.650000"
spike = "1.400000"
h_sharp = "3.000002"
s_sharp = "0.700000"
sth = "0.300000"
csize = "0.115000"
bsize1 = "0.300000"
warpX = "0.040000"
warpY = "0.050000"
shadowMask = "9.000000"
maskstr = "1.000000"
mask_gamma = "2.399999"
slotmask = "0.800000"
slotmask1 = "1.000000"
slotwidth = "3.000000"
double_slot = "2.000000"
mclip = "0.350000"
gamma_out = "2.200000"
decons = "0.800000"
deconsmooth = "1.000000"
3 Likes

Where :stuck_out_tongue:

1 Like

Couple of days back. :wink: Now they are integrated into all versions.

3 Likes

Hi, @guest.r.

Why does Prescale-X Factor: 2.00 remove scanlines in TATE mode?

1 Like

Nice, I’m already using some of your parameters now. I’m assuming that slot mask preset is tailored to be used with mask 9, can those same parameters also be used for slot mask using mask 10 or maybe you’d tweak it a little differently? I’m currently using mask 10 with both bright and dark slot mask strengths cranked all the way to the max

3 Likes

It isn’t a TATE compatible functionality (yet). Atm. you can use fbneo for example if you want (xbr…) smoothed graphics.

The overall brightness loss with mask 10 is greater compared with mask 9. So you might want to tweak the brightboost parameters or similar.

3 Likes

I forgot that you had posted preset settings for slotmask plus mask 10 a few posts up, I went back and used those settings. My preset before looked like this:

After applying your settings it now looks like this:

I think it looks so much better. I plan to upload the preset later on, gotta get some rest for now.

4 Likes

Ok so I’m about ready to go prime time with my updated preset using settings from @guest.r from this post. After I applied those settings I noticed some slight but noticeable moire appear when using curvature that I previously didn’t have. This is how my preset looked before:

And this is how it looks after applying the new parameters:

@guest.r is there a way to get rid of that moire while still keeping your settings intact?

@HyperspaceMadness also mentioned something to me earlier about my preset as well, he said he noticed the “Scanline Type” parameter is set to -1 but that he can still see scanlines, he mentioned that he thought -1 meant no scanlines at all but I just assumed -1 was to give very faint scanlines, is that what putting it to -1 supposed to do?

Here’s my preset so far:

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 = "true"
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/grade/pre-shaders-afterglow-grade.slang"
filter_linear3 = "true"
wrap_mode3 = "clamp_to_border"
mipmap_input3 = "false"
alias3 = "PrePass0"
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/ntsc/shaders/ntsc-adaptive/ntsc-pass1.slang"
filter_linear4 = "false"
wrap_mode4 = "clamp_to_border"
frame_count_mod4 = "2"
mipmap_input4 = "false"
alias4 = ""
float_framebuffer4 = "true"
srgb_framebuffer4 = "false"
scale_type_x4 = "source"
scale_x4 = "4.000000"
scale_type_y4 = "source"
scale_y4 = "1.000000"
shader5 = "shaders_slang/ntsc/shaders/ntsc-adaptive/ntsc-pass2.slang"
filter_linear5 = "true"
wrap_mode5 = "clamp_to_border"
mipmap_input5 = "false"
alias5 = ""
float_framebuffer5 = "false"
srgb_framebuffer5 = "false"
scale_type_x5 = "source"
scale_x5 = "0.500000"
scale_type_y5 = "source"
scale_y5 = "1.000000"
shader6 = "shaders_slang/crt/shaders/guest/advanced/custom-fast-sharpen.slang"
filter_linear6 = "true"
wrap_mode6 = "clamp_to_border"
mipmap_input6 = "false"
alias6 = "NtscPass"
float_framebuffer6 = "false"
srgb_framebuffer6 = "false"
scale_type_x6 = "source"
scale_x6 = "1.000000"
scale_type_y6 = "source"
scale_y6 = "1.000000"
shader7 = "shaders_slang/crt/shaders/guest/advanced/convert-ntsc.slang"
filter_linear7 = "true"
wrap_mode7 = "clamp_to_border"
mipmap_input7 = "false"
alias7 = ""
float_framebuffer7 = "false"
srgb_framebuffer7 = "false"
scale_type_x7 = "source"
scale_x7 = "0.500000"
scale_type_y7 = "source"
scale_y7 = "1.000000"
shader8 = "shaders_slang/stock.slang"
filter_linear8 = "true"
wrap_mode8 = "clamp_to_border"
mipmap_input8 = "true"
alias8 = "PrePass"
float_framebuffer8 = "false"
srgb_framebuffer8 = "false"
scale_type_x8 = "source"
scale_x8 = "1.000000"
scale_type_y8 = "source"
scale_y8 = "1.000000"
shader9 = "shaders_slang/crt/shaders/guest/advanced/avg-lum-ntsc.slang"
filter_linear9 = "true"
wrap_mode9 = "clamp_to_border"
mipmap_input9 = "true"
alias9 = "AvgLumPass"
float_framebuffer9 = "false"
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/linearize-ntsc.slang"
filter_linear10 = "true"
wrap_mode10 = "clamp_to_border"
mipmap_input10 = "false"
alias10 = "LinearizePass"
float_framebuffer10 = "true"
srgb_framebuffer10 = "false"
scale_type_x10 = "source"
scale_x10 = "1.000000"
scale_type_y10 = "source"
scale_y10 = "1.000000"
shader11 = "shaders_slang/crt/shaders/guest/advanced/gaussian_horizontal.slang"
filter_linear11 = "true"
wrap_mode11 = "clamp_to_border"
mipmap_input11 = "false"
alias11 = ""
float_framebuffer11 = "true"
srgb_framebuffer11 = "false"
scale_type_x11 = "absolute"
scale_x11 = "640"
scale_type_y11 = "source"
scale_y11 = "1.000000"
shader12 = "shaders_slang/crt/shaders/guest/advanced/gaussian_vertical.slang"
filter_linear12 = "true"
wrap_mode12 = "clamp_to_border"
mipmap_input12 = "false"
alias12 = "GlowPass"
float_framebuffer12 = "true"
srgb_framebuffer12 = "false"
scale_type_x12 = "absolute"
scale_x12 = "640"
scale_type_y12 = "absolute"
scale_y12 = "480"
shader13 = "shaders_slang/crt/shaders/guest/advanced/bloom_horizontal.slang"
filter_linear13 = "true"
wrap_mode13 = "clamp_to_border"
mipmap_input13 = "false"
alias13 = ""
float_framebuffer13 = "true"
srgb_framebuffer13 = "false"
scale_type_x13 = "absolute"
scale_x13 = "640"
scale_type_y13 = "absolute"
scale_y13 = "480"
shader14 = "shaders_slang/crt/shaders/guest/advanced/bloom_vertical.slang"
filter_linear14 = "true"
wrap_mode14 = "clamp_to_border"
mipmap_input14 = "false"
alias14 = "BloomPass"
float_framebuffer14 = "true"
srgb_framebuffer14 = "false"
scale_type_x14 = "absolute"
scale_x14 = "640"
scale_type_y14 = "absolute"
scale_y14 = "480"
shader15 = "shaders_slang/crt/shaders/guest/advanced/crt-guest-advanced-ntsc.slang"
filter_linear15 = "true"
wrap_mode15 = "clamp_to_border"
mipmap_input15 = "false"
alias15 = ""
float_framebuffer15 = "false"
srgb_framebuffer15 = "false"
scale_type_x15 = "viewport"
scale_x15 = "1.000000"
scale_type_y15 = "viewport"
scale_y15 = "1.000000"
shader16 = "shaders_slang/crt/shaders/guest/advanced/deconvergence.slang"
filter_linear16 = "true"
wrap_mode16 = "clamp_to_border"
mipmap_input16 = "false"
alias16 = ""
float_framebuffer16 = "false"
srgb_framebuffer16 = "false"
scale_type_x16 = "viewport"
scale_x16 = "1.000000"
scale_type_y16 = "viewport"
scale_y16 = "1.000000"
g_signal_type = "0.000000"
wp_temperature = "8004.000000"
quality = "0.000000"
ntsc_phase = "3.000000"
GAMMA_INPUT = "2.200000"
interm = "5.000000"
SIZEHB = "3.000000"
SIGMA_HB = "0.750000"
SIZEVB = "3.000000"
SIGMA_VB = "0.750000"
bloom = "0.700000"
bloom_dist = "1.600001"
halation = "0.100000"
gamma_c = "1.360000"
brightboost = "1.300001"
brightboost1 = "1.250000"
gsl = "-1.000000"
scanline1 = "2.500000"
scanline2 = "14.000000"
beam_min = "1.800000"
beam_max = "0.775000"
beam_size = "0.750000"
scans = "1.650000"
scan_falloff = "0.650000"
spike = "1.500000"
sth = "0.300000"
csize = "0.060000"
bsize1 = "0.300000"
warpX = "0.040000"
warpY = "0.050000"
shadowMask = "10.000000"
maskstr = "1.000000"
mask_gamma = "2.399999"
slotmask = "1.000000"
slotmask1 = "1.000000"
slotwidth = "4.000000"
double_slot = "2.000000"
mclip = "0.350000"
gamma_out = "2.200000"
deconrry = "1.250000"
deconrby = "-1.250000"
decons = "1.400000"
addnoised = "-0.300000"
noiseresd = "1.000000"
post_br = "1.150000"
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

A general moire mitigation can come when adding some noise, there was even an article on this on @hunterk 's blog. Otherwise it generally helps to either use less intensive scanlines/masks, especially for darker colors.

Scanline type parameter -1.0 is a preset for the least intensive scanlines. Currently there isn’t a preset for ‘scanlines off’, but it can be achieved in more ways.

Nevertheless, it’s a very nice preset you are working on and it might look differently with the mega bezel, because it uses different curvature algos (there are more of them). It would be a great idea to fine tweak the curvature… using the bezel environment.

4 Likes

just to add a bit: moire is an aliasing effect. That is, it’s a pattern created by resampling repeating high-frequency information to a lower resolution–and the resolution gradient caused by faux curvature makes it especially visible. As such, the way to deal with it is through dithering–i.e., noise–or low-pass filtering–i.e., anti-aliasing or, more generally speaking, blur.

6 Likes