New CRT shader from Guest + CRT Guest Advanced updates

Are you referring to GDV’s slotmask or mask 1 (Lottes slotmask)?

The standalone slotmask. The mask function had a bug though, which caused other masks output at increased brightness with darker pixels.

1 Like

For the horizontal deconvergence, I’m seeing red on the left and green on the right. It should be red on the left and blue on the right, because that’s how CRT phosphors were arranged (R, G, B). Probably an easy fix.

Vertical deconvergence looks good though.

2 Likes

You can the get red - “blue” implementation with negative values for horizontal deconvergence. :wink: I had to change pure blue to teal though, otherwise it’s quite glitchy.

3 Likes

Glow is MUCH better, now. I’m seeing a pretty big improvement across the board wrt color, too.

I still like to keep glow at low levels since I’m using a display that already has phosphor glow (plasma). I think if you’re using a plasma or OLED display you’ll want to use glow sparingly.

This is just my usual starting approach- max scanline dark, max bright pixel bright boost, gamma at 3.50/3.50. Looking pretty good so far, IMO. I’m also noticing that a lot of masks look better now with dark pixels; seems like there’s a gain in fidelity, there. Need to take a closer look at black level later but I’m happy so far.

shaders = "11"
shader0 = "shaders_slang/misc/grade.slang"
wrap_mode0 = "clamp_to_border"
mipmap_input0 = "false"
alias0 = ""
float_framebuffer0 = "false"
srgb_framebuffer0 = "false"
shader1 = "shaders_slang/crt/shaders/guest/lut/lut.slang"
filter_linear1 = "false"
wrap_mode1 = "clamp_to_border"
mipmap_input1 = "false"
alias1 = ""
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/color-profiles.slang"
filter_linear2 = "true"
wrap_mode2 = "clamp_to_border"
mipmap_input2 = "false"
alias2 = ""
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/d65-d50.slang"
filter_linear3 = "true"
wrap_mode3 = "clamp_to_border"
mipmap_input3 = "false"
alias3 = "WhitePointPass"
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/afterglow.slang"
filter_linear4 = "true"
wrap_mode4 = "clamp_to_border"
mipmap_input4 = "false"
alias4 = "AfterglowPass"
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/avg-lum.slang"
filter_linear5 = "true"
wrap_mode5 = "clamp_to_border"
mipmap_input5 = "true"
alias5 = "AvgLumPass"
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/linearize.slang"
filter_linear6 = "true"
wrap_mode6 = "clamp_to_border"
mipmap_input6 = "false"
alias6 = "LinearizePass"
float_framebuffer6 = "true"
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/linearize_scanlines.slang"
filter_linear7 = "true"
wrap_mode7 = "clamp_to_border"
mipmap_input7 = "false"
alias7 = "ScanPass"
float_framebuffer7 = "true"
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/blur_horiz2.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 = "source"
scale_y8 = "1.000000"
shader9 = "shaders_slang/crt/shaders/guest/blur_vert2.slang"
filter_linear9 = "true"
wrap_mode9 = "clamp_to_border"
mipmap_input9 = "false"
alias9 = "GlowPass"
float_framebuffer9 = "true"
srgb_framebuffer9 = "false"
scale_type_x9 = "absolute"
scale_x9 = "800"
scale_type_y9 = "absolute"
scale_y9 = "600"
shader10 = "shaders_slang/crt/shaders/guest/crt-guest-dr-venom2.slang"
filter_linear10 = "true"
wrap_mode10 = "clamp_to_border"
mipmap_input10 = "false"
alias10 = ""
float_framebuffer10 = "false"
srgb_framebuffer10 = "false"
scale_type_x10 = "viewport"
scale_x10 = "1.000000"
scale_type_y10 = "viewport"
scale_y10 = "1.000000"
parameters = "g_gamma_in;g_signal_type;g_gamma_type;g_crtgamut;g_space_out;g_hue_degrees;g_I_SHIFT;g_Q_SHIFT;g_I_MUL;g_Q_MUL;g_lum_fix;g_vignette;g_vstr;g_vpower;g_lum;g_cntrst;g_mid;wp_temperature;g_sat;g_vibr;g_satr;g_satg;g_satb;g_lift;blr;blg;blb;wlr;wlg;wlb;rg;rb;gr;gb;br;bg;LUT_Size1;LUT1_toggle;LUT_Size2;LUT2_toggle;TNTC;CP;CS;WP;wp_saturation;SW;AR;PR;AG;PG;AB;PB;sat;lsmooth;GAMMA_INPUT;SIZEH;GLOW_FALLOFF_H;SIZEV;GLOW_FALLOFF_V;glow;bloom;TATE;IOS;OS;BLOOM;brightboost;brightboost1;gsl;scanline1;scanline2;beam_min;beam_max;beam_size;decon;vertmask;scans;spike;h_sharp;s_sharp;csize;bsize;warpX;warpY;shadowMask;masksize;maskDark;maskLight;CGWG;mcut;slotmask;slotwidth;double_slot;slotms;inter;interm;gamma_out"
g_gamma_in = "2.400000"
g_signal_type = "1.000000"
g_gamma_type = "1.000000"
g_crtgamut = "2.000000"
g_space_out = "0.000000"
g_hue_degrees = "0.000000"
g_I_SHIFT = "0.000000"
g_Q_SHIFT = "0.000000"
g_I_MUL = "1.000000"
g_Q_MUL = "1.000000"
g_lum_fix = "0.000000"
g_vignette = "0.000000"
g_vstr = "40.000000"
g_vpower = "0.200000"
g_lum = "0.000000"
g_cntrst = "0.000000"
g_mid = "0.500000"
wp_temperature = "8004.000000"
g_sat = "0.000000"
g_vibr = "0.000000"
g_satr = "0.000000"
g_satg = "0.000000"
g_satb = "0.000000"
g_lift = "0.000000"
blr = "0.000000"
blg = "0.000000"
blb = "0.000000"
wlr = "1.000000"
wlg = "1.000000"
wlb = "1.000000"
rg = "0.000000"
rb = "0.000000"
gr = "0.000000"
gb = "0.000000"
br = "0.000000"
bg = "0.000000"
LUT_Size1 = "16.000000"
LUT1_toggle = "0.000000"
LUT_Size2 = "64.000000"
LUT2_toggle = "0.000000"
TNTC = "0.000000"
CP = "0.000000"
CS = "0.000000"
WP = "0.000000"
wp_saturation = "1.000000"
SW = "1.000000"
AR = "0.070000"
PR = "0.050000"
AG = "0.070000"
PG = "0.050000"
AB = "0.070000"
PB = "0.050000"
sat = "0.100000"
lsmooth = "0.900000"
GAMMA_INPUT = "3.499999"
SIZEH = "4.000000"
GLOW_FALLOFF_H = "0.300000"
SIZEV = "4.000000"
GLOW_FALLOFF_V = "0.300000"
glow = "0.010000"
bloom = "0.000000"
TATE = "0.000000"
IOS = "0.000000"
OS = "1.000000"
BLOOM = "0.000000"
brightboost = "1.000000"
brightboost1 = "3.000000"
gsl = "0.000000"
scanline1 = "1.000000"
scanline2 = "40.000000"
beam_min = "2.500000"
beam_max = "1.000000"
beam_size = "0.000000"
decon = "1.000000"
vertmask = "1.000000"
scans = "0.700000"
spike = "1.000000"
h_sharp = "4.000001"
s_sharp = "0.000000"
csize = "0.000000"
bsize = "600.000000"
warpX = "0.000000"
warpY = "0.000000"
shadowMask = "1.000000"
masksize = "1.000000"
maskDark = "0.500000"
maskLight = "1.500000"
CGWG = "0.300000"
mcut = "1.200000"
slotmask = "0.000000"
slotwidth = "2.000000"
double_slot = "1.000000"
slotms = "1.000000"
inter = "400.000000"
interm = "1.000000"
gamma_out = "3.499999"
textures = "SamplerLUT1;SamplerLUT2;SamplerLUT3"
SamplerLUT1 = "shaders_slang/crt/shaders/guest/lut/sony_trinitron1.png"
SamplerLUT1_linear = "true"
SamplerLUT1_wrap_mode = "clamp_to_border"
SamplerLUT1_mipmap = "false"
SamplerLUT2 = "shaders_slang/crt/shaders/guest/lut/sony_trinitron2.png"
SamplerLUT2_linear = "true"
SamplerLUT2_wrap_mode = "clamp_to_border"
SamplerLUT2_mipmap = "false"
SamplerLUT3 = "shaders_slang/crt/shaders/guest/lut/other1.png"
SamplerLUT3_linear = "true"
SamplerLUT3_wrap_mode = "clamp_to_border"
SamplerLUT3_mipmap = "false"
2 Likes

I’m getting 255 white with scanline type 0 when measuring the center of the beam, no mask.

The last version for today. I managed to work on the deconvergences and i’m pleased for now. The overall image brightness should not decrease too much, maybe a notch.

https://mega.nz/file/w5piWbbJ#pcnsOiX1Fo03JlXs1Plmn67uDBiMwz3UUSJReUuV3m0

As always, feedback and suggestions are welcome. :upside_down_face:

5 Likes

Using other shaders the deconvergence amount is affected by 4k vs 1080. When I try to dial in higher numbers than is allowed I get something that looks like clipping. I’m curious if 4k affects anything other than the mask size?

1 Like

Deconvergence should look nicer in 4k since it’s distributed by interpolation, but if the original game resolution is higher, the effect is much thinner, since it’s an original pixel oriented implementation. Higher numbers than allowed lead to glitches though. With 4k you get superb fidelity for most of the interpolated effects, and mask size 2 becomes viable.

1 Like

And a quick ‘demo’ of some new features:

I should mention that it’s a quick setup, you guys or gals can do better ofc. :grin:

2 Likes

It would be great if you could adapt the deconvergence feature to work as shown in the video below: CRT convergence on a Sony PVM.

https://www.youtube.com/watch?v=SNf5SCVhb3g

I took five screenshots from 2:20 onwards that show the convergence going in steps from strong deconvergence to full convergence, see below. It would be insane if the shader feature could be implemented in a way that these different convergence screenshots could be replicated :exploding_head:

He comments that he uses the 240p testsuite for this test. Note that in screenshot three, when the guy is dialing in the convergence, on the left you can see it go from a lot of Blue-Green-Red deconvergence to BLUE-CYAN-YELLOW-RED as a middlestep before it turns to Blue-White-Red and then to White.

3 Likes

Hey there!

Good news is, you can check the Dogway’s excellent Glass shader (at his Github site), it’s not in the Libretro repository yet, increase the number of passes by 1 and add the glass.slang. Works very well.

2 Likes

Thanks I will give that a go :slightly_smiling_face:.

Back to your shader, any change that you could make an additional switch that creates your deconvergence with red on the right (instead of green) such that we have blue left and red right as in the YouTube video? :crossed_fingers:

Also could you post the setting you used for that screenshot, it’s looking really nice :ok_hand:

Final question, do you think your V2 is now optimized to fully utilize (make full use of fine granularity of) 4K resolution?

1 Like

I’m not sure what’s going on here.

I’ve always seen red bleed to the left and blue bleed to the right on CRTs.

Lots of examples here.

Did some PVMs have an RBG phosphor layout?

@guest.r :

I’m also curious!

2 Likes

I’m not noticing any vertical deconvergence at the top/bottom edges of the white square; is there a way to correct this?

1 Like

Actually it’s there it’s just not anywhere near as pronounced.

I do see it but yeah it’s not as pronounced as it should be. So far I’m liking the convergence in glass more, haven’t been able to get the GDV convergence to look quite how I want it.

It’s a bit tricky without increasing the parameter “Increased bright scanline beam”.

2 Likes

I’ve never understood what this setting does, can you give a brief explanation?

2 Likes

It allows bright scanline beams to expand a bit into the darker space. You can get more apparent beam dynamics etc. Anyway, thanks for the feedback, it’s very welcome.

3 Likes