New CRT shader from Guest + CRT Guest Advanced updates

Hello again.

I’ve continued to work on my shader skills, and I’ve turned my eye towards 480i/p content. Because I haven’t seen as many screenshots for this type of content, I’ve included a few slot mask / aperture grille screen grabs below for Dreamcast and Playstation 2.

Constructive criticism and advice is always welcome, and if there is none to be given, I hope you find it to be eye candy.

8 Likes

Looking good. What mask are you using in the second shot?

1 Like

Very nice settings. For an optional no-scanline setup definitelly try the HD version and slotmask.

My TV is a 4K display, so you might have to adjust these mask settings for your display resolution. The second screenshot used the following CRT mask settings:

  • Mask: 6
  • Mask Size: 2
  • Mask Zoom: -1
  • Mask Strength: 1.0
  • Mask Boost: 1.4
  • Red Horizontal/Vertical Deconvergence: 1.0
  • Blue Horizontal/Vertical Deconvergence: -1.0

I dont have a lot of CRT reference photos where you can see the mask itself, so I’m not sure if deconverging the blue vertically is accurate. It’s just something I’ve played with.

2 Likes

Is the hd version designed for 480p content?

1 Like

I’m using 4k too, wouldn’t want to use any lower for 480p shaders. It’s OLED though so the mask might not look right

It’s designed for any content in fact, but it can handle greater input resolutions better than other versions. You can also use it to downsample “higher than your display’s” resolutions.

3 Likes

If you use Mask Layout 1 (BGR) it should look perfect. You can also try Mask 12, Size 1 for a 4K Trinitron Mask. That one has a slightly larger black gap between the RGB triads.

The 3rd screenshot appears magenta green and something seems off with the Slot Mask structure. Is the Slot Mask Width/Size set to Auto?

2 Likes

Not specifically designed for it, but for me it gives much better results for 480p content than any other shader I’ve ever tried. (Running it on a 1440p screen.)

2 Likes

Unfortunately, it’s summer and I’m going to be out of town for the month, so I can’t check on what my settings were exactly until the 26th or so. However, I can tell you what I am pretty sure the settings were:

  • Slot Mask Strength Bright Pixels: 1.00
  • Slot Mask Strength Dark Pixels: 1.00
  • Slot Mask Width: 0.00
  • Slot Mask Height: 2.00
  • Slot Mask Thickness: 1.00
  • Keep Mask Effect With Clipping: 0.30 - 0.40

If you feel they are misaligned, can you share a zoomed in screen grab giving an example, and also, if possible, adjustments to the settings that might properly align them? It’d be great to learn how to better identify misaligned slot masks and how to correct them.

Thanks!

2 Likes

For slotmask, you might use the combination of mask 12, mask size 1 and mask zoom -2.0 instead of mask 6, mask size 2.0 and mask zoom -1.0.

Both combinations have total mask width of 5, but latter has better defined separation between the RGB color components / triads, which is cool for the slotmask effect.

3 Likes

This is really interesting. My choice of specific Trinitron masks and zoom have revolved around my perception of the product TVL and if the color balance was irrecoverably thrown off or not. Mask 12 at a zoom of -2.0 is something that I’ll definitely try when I get back.

Do you suggest that I take screen grabs and look at them zoomed in to see how the color separation looks, and that greater color distinction between the “triads” improves the quality of the slot mask effect?

It also may be worth noting that the Odin Sphere screen grab is using Mask 5 (if I recall correctly), and not Mask 6, and that the other two images use Mask 6 with a Mask Zoom of -1.0.

1 Like

Does anyone have any idea what could cause mask 6 to tint everything blue. On Linux (Arch BTW). With a hybrid graphics setup (AMD integrated, Nvidia dedicated). And across both Wayland and Xorg. Primarily when using the vulkan driver… and yes, I checked my monitor.

I was working on a pretty great new preset that sates my madness using new methods. Said methods allow me to use masks other than 13, but not if there’s some config file somewhere telling the drivers to misbehave.

1 Like

Maybe some other linux user could test it, it would help to resolve the situation. Meanwhile you could try mask 10 with mask zoom -1.0.

2 Likes

Have you tried to run the preset on both cards to isolate driver issues?

1 Like

Oddly enough retroarch isn’t letting me switch GPUs when using the vulkan driver, even when I’m not using “prime-run”.

I keep everything important on external hard drives so I think I’ll just go nuclear and reinstall arch. I fear, however, that might not solve the problem. Won’t learn anything either.

Mask 10 is tint free without mask zoom. At mask zoom -1.0 it tints green. At mask size 2.0 with zoom -1.0 it’s much more subtle. The tint changes with the zoom setting.

1 Like

If retroarch won’t allow you to switch, and assuming you’re using a prime render offload configuration, you can still switch vulkan drivers by command line; the following are examples for intel vulkan and nvidia, i ignore amd.

VK_ICD_FILENAMES=/usr/share/vulkan/icd.d/intel_icd.x86_64.json retroarch

VK_ICD_FILENAMES=/usr/share/vulkan/icd.d/nvidia_icd.json retroarch

2 Likes

After reinstalling Arch Linux several times over for reasons that became more related to general rolling-release instability than anything involving retroarch, the blue tint is now limited to dreamcast games (flycast). Previously my genesis library was affected as well. This makes me think the problem was around before it spread to the genesis games.

I can switch now but this is good to know regardless.

Anyway this is not a linux debug thread; have some screenshots from the work in progress. Alcahest-English-v1-0-Addendum-230707-182358 Bare-Knuckle-Ikari-no-Tetsuken-Streets-of-Rage-World-230707-182256 Zusar-Vasar-Japan-230707-182429

Edit: While I was uploading these images I was able zoom into that Dreamcast screen. It’s as if the red “phoshors” just up and decided to be blue “phosphors”.

2 Likes

Actually… Here’s the settings. Lets confirm it’s just me.

EffortWip.slangp

shaders = "12"
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 = "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 = "true"
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"
PR = "0.460000"
PG = "0.460000"
PB = "0.460000"
AS = "0.100000"
sat = "1.000000"
contr = "0.000001"
GAMMA_INPUT = "2.000000"
gamma_out = "2.000000"
interm = "0.000000"
m_glow = "1.000000"
m_glow_cutoff = "0.000000"
m_glow_low = "0.300000"
m_glow_high = "0.900000"
m_glow_dist = "4.000000"
m_glow_mask = "0.000000"
SIZEH = "50.000000"
SIGMA_H = "0.800000"
SIZEV = "50.000000"
SIGMA_V = "0.800000"
SIZEHB = "50.000000"
SIGMA_HB = "0.500000"
SIZEVB = "50.000000"
glow = "0.500000"
mask_bloom = "0.150000"
halation = "-0.500000"
brightboost = "1.000000"
brightboost1 = "1.000000"
scanline1 = "10.500000"
scanline2 = "20.000000"
beam_min = "0.700000"
beam_max = "0.625000"
beam_size = "0.000000"
scans = "0.000000"
spike = "0.000000"
scangamma = "1.500001"
shadowMask = "6.000000"
maskstr = "0.900000"
mcut = "1.000000"
maskboost = "1.150000"
masksize = "2.000000"
mask_gamma = "1.500000"
slotmask = "0.900000"
slotmask1 = "1.000000"
slotwidth = "6.000000"
double_slot = "3.000000"
mclip = "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"
1 Like

This issue hangs around for a while now also on other operating systems. If you run a flycast game with the vulkan driver it spreads to other cores also unless you restart RA. Glcore should be fine, so i guess it’s not a specific guest-advanced situation like it had a bug i could/should fix.

2 Likes