New CRT shader from Guest + CRT Guest Advanced updates

@guest.r There is also “mask size 2.0 / zoom -1.0” that looks good on 4k. It may look similar to the others pictures but when you zoom in you can see the difference and what it does on the red text. Edit: I said somenthing with bloom but it was actually another mask. (it’s time to sleep :sweat_smile:)

2 Likes

New Release Version (2023-11-03-r1):

Notable changes:

  • Mask Zoom Sharpen functionality added.
  • Zoomed masks can look much crisper now with this feature.
  • Existing presets aren’t affected, this is purely optional.

Download link:

https://mega.nz/file/d4QRVaaC#-bdgl2W1QzWPbaOPNKvqUddEwDNZJ0nP3LOztfFY6E8

11 Likes

This is a very nice feature! I can clearly see the difference, i like it. Thanks for the link! :100:

Edit:

Sharpness 3.30, substractive 0.0, SIGMA_HB default 0.75

Guest-advanced

GAMMA_INPUT = "2.500000"
gamma_out = "2.200000"
interm = "0.000000"
m_glow = "1.000000"
m_glow_cutoff = "0.000000"
m_glow_low = "0.500000"
m_glow_high = "0.000000"
m_glow_mask = "0.000000"
SIZEHB = "1.000000"
SIGMA_HB = "0.350000"
SIZEVB = "1.000000"
SIGMA_VB = "0.050000"
glow = "0.000000"
halation = "0.100000"
hmask1 = "0.000000"
brightboost = "1.000000"
brightboost1 = "1.000000"
gsl = "1.000000"
scanline1 = "20.000000"
scanline2 = "20.000000"
beam_min = "1.175000"
beam_max = "1.175000"
beam_size = "0.000000"
scans = "1.000000"
scan_falloff = "0.100000"
spike = "2.000000"
scangamma = "5.000000"
h_sharp = "4.800000"
s_sharp = "2.000000"
ei_limit = "0.000000"
sth = "0.000000"
c_shape = "0.050000"
bsize1 = "0.000000"
sborder = "0.250000"
shadowMask = "2.000000"
maskstr = "1.000000"
mcut = "2.000000"
masksize = "2.000000"
mask_zoom = "-1.000000"
mzoom_sh = "1.000000"
mask_layout = "1.000000"
maskDark = "0.000000"
maskLight = "1.000000"
mask_gamma = "5.000000"
slotmask = "1.000000"
slotmask1 = "1.000000"
smoothmask = "1.000000"
post_br = "1.610000"
5 Likes

Some new stuff in the preset:

8 Likes

I played that game on the ZX spectrum lots of year ago :sweat_smile:. Now you made me want to play the ZX spectrum again! Is that the C64 version?

2 Likes

Amiga version. But I first played in on C64 indeed. :smiley:

2 Likes

This has been my go to shader for almost every single system out there – the configuration options allow this shader to become basically a swiss army knife of shaders! Thank you so much for putting in so much effort for this, I really appreciate it.

The one use case that I’m having issues with now, is using this shader for the DOSBox-Pure core. Specifically, for VGA games that use double scan and the DOS console (and the resolution changes between them). Would it be possible to add a double scan option to this shader and a resolution cut-off to switch into double-scan mode (sort of like how the interlace mode is detected)? Right now the shader looks great on the DOS console and text modes, but once you launch a VGA game, you get those thick scanlines that look great on consoles, but not really accurate to the VGA monitors who would double those resolutions automatically.

Hopefully this request makes sense – please let me know if I need to explain it better or if there’s already a way to achieve this that I’m not aware of.

Thank you again for all your work on this and your attention to detail!

2 Likes

Hey there!

Can you test the crt-guest-advanced version?

https://mega.nz/file/A4wVXCqY#p-8u3ECdJhb5mqaUCfwPxyHCcnbgWIfLCmFPL2ae5_4

It’s only implemented there atm. It switches between single and double scan based on the trigger resolution. VGA Single/Double Scan mode under Interlacing options should be set to 1.0.

Hope it works. :smiley:

Edit: OTOH it would be more simple to “fix” all shaders so that higher resolutions in double scan mode trigger standard interlacing (there are also “non-flickering” options). This would be a basic fix indeed.

3 Likes

I just tested it, and as expected, it works perfectly!

Thank you so much for adding this for me, it’s exactly what I was trying to acheive. I’d go as far as say that it even works better (and looks better) than the auto-crt stuff they are doing in DOSBox-Staging without all the code changes to swap between shaders.

For the record, I tested it at 1440p using DOSBox-Pure core and used the default settings (only enabling the double-scan mode) and it works perfectly, handles the mode changes as expected and looks fantastic.

Thank you again for working on this – I and the community appreciate your work immensely.

3 Likes

New Release Version (2023-11-05-r2):

Notable changes:

  • VGA Single/Double scan mode added to standard, HD and fast versions.
  • Just set the parameter under Interlacing options to 1.0 and the mode is active.
  • Release2: Tinting with (positive) mask zoom greatly improved.

Download link:

https://mega.nz/file/NlZRyAJK#5sV4bXfG60wb2lhKZC78XtqsWIV_9Y5ZhohZ-jRjR2k

15 Likes

Good Jobs

3 Likes

The new mask setting is so nice, the combination of “mask 10.0 / size 2.0 / zoom -2.0 / mask sharpen 1.0 and mask layout 1.0” will look like an oval shape.

5 Likes

Far out! :exploding_head:

2 Likes

hello is it possible that you share your setting? I really like your work

3 Likes

Hey thanks, here is the preset.

shaders = "18"
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/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 = "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/pre-shaders-afterglow.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/crt/shaders/guest/advanced/ntsc/ntsc-pass1.slang"
filter_linear4 = "false"
wrap_mode4 = "clamp_to_border"
mipmap_input4 = "false"
alias4 = "NPass1"
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/crt/shaders/guest/advanced/ntsc/ntsc-pass2.slang"
filter_linear5 = "true"
wrap_mode5 = "clamp_to_border"
mipmap_input5 = "false"
alias5 = ""
float_framebuffer5 = "true"
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/ntsc/ntsc-pass3.slang"
filter_linear6 = "true"
wrap_mode6 = "clamp_to_border"
mipmap_input6 = "false"
alias6 = ""
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/custom-fast-sharpen.slang"
filter_linear7 = "true"
wrap_mode7 = "clamp_to_border"
mipmap_input7 = "false"
alias7 = "NtscPass"
float_framebuffer7 = "false"
srgb_framebuffer7 = "false"
scale_type_x7 = "source"
scale_x7 = "1.000000"
scale_type_y7 = "source"
scale_y7 = "1.000000"
shader8 = "shaders_slang/crt/shaders/guest/advanced/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/crt-guest-advanced-ntsc-pass1.slang"
filter_linear11 = "true"
wrap_mode11 = "clamp_to_border"
mipmap_input11 = "false"
alias11 = "Pass1"
float_framebuffer11 = "true"
srgb_framebuffer11 = "false"
scale_type_x11 = "viewport"
scale_x11 = "1.000000"
scale_type_y11 = "source"
scale_y11 = "1.000000"
shader12 = "shaders_slang/crt/shaders/guest/advanced/gaussian_horizontal.slang"
filter_linear12 = "true"
wrap_mode12 = "clamp_to_border"
mipmap_input12 = "false"
alias12 = ""
float_framebuffer12 = "true"
srgb_framebuffer12 = "false"
scale_type_x12 = "source"
scale_x12 = "1.000000"
scale_type_y12 = "source"
scale_y12 = "1.000000"
shader13 = "shaders_slang/crt/shaders/guest/advanced/gaussian_vertical.slang"
filter_linear13 = "true"
wrap_mode13 = "clamp_to_border"
mipmap_input13 = "false"
alias13 = "GlowPass"
float_framebuffer13 = "true"
srgb_framebuffer13 = "false"
scale_type_x13 = "source"
scale_x13 = "1.000000"
scale_type_y13 = "source"
scale_y13 = "1.000000"
shader14 = "shaders_slang/crt/shaders/guest/advanced/bloom_horizontal.slang"
filter_linear14 = "true"
wrap_mode14 = "clamp_to_border"
mipmap_input14 = "false"
alias14 = ""
float_framebuffer14 = "true"
srgb_framebuffer14 = "false"
scale_type_x14 = "source"
scale_x14 = "1.000000"
scale_type_y14 = "source"
scale_y14 = "1.000000"
shader15 = "shaders_slang/crt/shaders/guest/advanced/bloom_vertical.slang"
filter_linear15 = "true"
wrap_mode15 = "clamp_to_border"
mipmap_input15 = "false"
alias15 = "BloomPass"
float_framebuffer15 = "true"
srgb_framebuffer15 = "false"
scale_type_x15 = "source"
scale_x15 = "1.000000"
scale_type_y15 = "source"
scale_y15 = "1.000000"
shader16 = "shaders_slang/crt/shaders/guest/advanced/crt-guest-advanced-ntsc-pass2.slang"
filter_linear16 = "true"
wrap_mode16 = "clamp_to_border"
mipmap_input16 = "false"
alias16 = ""
float_framebuffer16 = "true"
srgb_framebuffer16 = "false"
scale_type_x16 = "viewport"
scale_x16 = "1.000000"
scale_type_y16 = "viewport"
scale_y16 = "1.000000"
shader17 = "shaders_slang/crt/shaders/guest/advanced/deconvergence-ntsc.slang"
filter_linear17 = "true"
wrap_mode17 = "clamp_to_border"
mipmap_input17 = "false"
alias17 = ""
float_framebuffer17 = "false"
srgb_framebuffer17 = "false"
scale_type_x17 = "viewport"
scale_x17 = "1.000000"
scale_type_y17 = "viewport"
scale_y17 = "1.000000"
AS = "0.000000"
sega_fix = "1.000000"
cust_fringing = "0.000000"
cust_artifacting = "0.000000"
ntsc_fields = "1.000000"
ntsc_phase = "3.000000"
ntsc_cscale = "2.250000"
ntsc_ring = "1.000000"
GAMMA_INPUT = "2.500000"
gamma_out = "2.200000"
interm = "0.000000"
spike = "0.000000"
m_glow = "1.000000"
m_glow_cutoff = "0.000000"
m_glow_low = "0.500000"
m_glow_high = "0.000000"
m_glow_mask = "0.000000"
SIGMA_H = "1.400000"
SIGMA_V = "1.050000"
SIZEHB = "1.000000"
SIGMA_HB = "0.450000"
SIZEVB = "1.000000"
SIGMA_VB = "0.050000"
glow = "0.010000"
bloom = "1.800000"
bmask1 = "0.775000"
hmask1 = "0.000000"
brightboost = "1.000000"
brightboost1 = "1.000000"
gsl = "1.000000"
scanline1 = "20.000000"
scanline2 = "20.000000"
beam_min = "1.275000"
beam_max = "1.275000"
beam_size = "1.000000"
scans = "1.000000"
scan_falloff = "2.000000"
scangamma = "5.000000"
shadowMask = "10.000000"
maskstr = "1.000000"
mcut = "2.000000"
masksize = "2.000000"
mask_zoom = "-2.000000"
mzoom_sh = "1.000000"
mask_layout = "1.000000"
maskDark = "0.000000"
maskLight = "1.000000"
mask_gamma = "5.000000"
smoothmask = "1.000000"
post_br = "1.710000"
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"
4 Likes

I knew I would end up missing out on something juicy being off the scene even for a short time lol. Can’t wait to try this new update out later.

2 Likes

The lite version is 25% faster than the standard, but how does it compare to the fast and fastest versions?

1 Like

I can give examples from my test case on an image:

  • Standard: 1100 FPS
  • Lite: 1350 FPS
  • Fast: 1880 FPS
  • Fastest: 4000 FPS

Minding that worst case scenario for fastest is like 2340 FPS. Performance is quite circumstantial.

Enabling or using features usually slows the shader down. OTOH interlaced and no-scanline modes are quite faster (1880 -> 2300 FPS with fast version).

3 Likes

Can you give an estimate about how Mask Zoom affects performance, or are there other reasons it’s not part of Fastest?

1 Like

Yeah, there should be like 250-300FPS less performance with mask zoom. I thought about adding the feature to the fastest version, but OTOH i want it to be faster compared with other versions, so it runs on less capable adapters and higher resolutions.

1 Like