New CRT shader from Guest + CRT Guest Advanced updates

Gamma on my display is a bit weird like 2.0 or so, it’s just the best gamma for this display. In theory you should be able to easily correct this with the gamma controls in the shader, but yeah it could also be your monitor.

@guest.r

How do the Trinitron mask controls work, is it the same as Lottes mask low/high?

This is something that’s been bothering me for a while: It seems like the phosphors are bleeding into each other way too much with all the aperture grille masks. IMO this looks very unnatural and is difficult to look at after a while. Is there a way to keep only the vertical phosphor bloom and eliminate/adjust the horizontal phosphor bloom? On a real aperture grille CRT the phosphors only bloom vertically.

BTW this is not specific to guest-dr-venom by any means, it’s something I’ve noticed in all shaders when you use a three color (RGB) mask.

Maybe this is a good reason to stick to two color masks (like mask 0 in GDV), where the effect I’m describing is less noticeable/annoying.

1 Like

You can pick 2 mask strengths, one for darker colors, one for brighter and the colors in between will get a custom mask strength. If you even the strengths, you get something similar to mask 0 etc. Lottes mask low/high only compensates for brightness loss and each pixel will get the same mask.

There could be three reasons for this, one is display technology, where the bleeding should be mitigated on a stiff VA panel and much more present on a plasma, poorer qualiy IPS, tricky to tell in general. The second reason could be that masks aren’t luma compliant, therefore using a same weight mask on white for example results in different perceptive experience for each color component. Hard to fix for masks in general and a reason 2-size masks are more visually pleasing in many cases. Third reason is probably gamma related, with low gamma masks are stiffer over brighter colors.

You can try with an increased mask strength and then compensate with brightboost or bloom. Scanline saturation should play a role with vertical bloom, but is better visible on higher resolution displays. With size 4-5 beams it can develop itself only partially, same for deconvergence.

1 Like

Unfortunately the lut issue I described is still not fixed.

It seems the issue may be a result of the changed color temperature code?

Maybe the issue is partially related to your lut?

Depending on the method that you made it

1 Like

No the lut is fine. It’s a standard DisplayCAL “Video 3D LUT for ReShade”. Worked with all versions of guest-venom2 until the update of yesterday. Also works fine with grade.slang. I think the issue is with the updated code for color temperature in guest-venom2 from yesterday.

EDIT: If I replace “pre-shaders-ntsc.slang” in the current update with the version from last saturday the issue is fixed. Since there seem mainly a rewrite of the color temperature code in this file, I suspect it’s causing the issue as decribed.

1 Like

Hard to tell, it’s reading the color from the stock pass and applying the lut. If stock pass is replaced, this could be something to consider. Color temperature code is calculated afterwards. Afterglow applied last. And your lut is working fine here. :confused: But you can really use the older shaders if you don’t mind using the old desaturation and color temperatures.

Hmm… This is rather dissapointing, can’t we get to the bottom of this? I’m on nvidia if that helps.

I’d rather not stick on a partial update of your shader.

If i do a diff on both files I see an overseeable amount of changes. Could you possibly make two or three versions of “pre-shaders-ntsc.slang” that implement separate sections of the changes. That way we could lock in to what’s breaking it on nvidia. Mind you, this is all working fine on grade.slang also (which also has the D50-D93 type of whitepoint code).

OKAY I’ve nailed it down to the following change:

If I delete this:

c = pow(color, vec3(2.2));
color = c;	

And replace this:

	mat3 m_out;

if (CS == 0.0) { m_out =  ToSRGB; } else
if (CS == 1.0) { m_out =  ToDCI;  } else
if (CS == 2.0) { m_out =  ToAdobe;} else
if (CS == 3.0) { m_out =  ToREC;  }

by this:

float p;
mat3 m_out;

if (CS == 0.0) { p = 2.4; m_out =  ToSRGB; } else
if (CS == 1.0) { p = 2.6; m_out =  ToDCI;  } else
if (CS == 2.0) { p = 2.2; m_out =  ToAdobe;} else
if (CS == 3.0) { p = 2.4; m_out =  ToREC;  }

color = pow(c, vec3(p));

Then the issue is resolved. Does that help?

2 Likes

I was about to prepare a test setup on an old system with nVidia gpu, so this should help indeed. :grinning: I can revert these changes and keep the effects, should go well.

Edit: pre_shader file only:

https://mega.nz/file/ct4jwAzQ#Eewm4B0IWwq96j6a-hON9Uvmt_f2KbzwXvpVHWM7fpY

3 Likes

Yes fixed :smiley: Could you also update the pre-shaders-ntsc?

Just to be sure, for accurate output when using the DisplayCAL LUT, I need to comment the part after “res = mixfix(color1, color2, mixer);” like below correct? (As everything after the res = mixfix is specific to the LUTs that come with your shader).

  else if (int(TNTC) == 4)
  {
     color1 = COMPAT_TEXTURE( SamplerLUT4, vec2( blue1, green ));
     color2 = COMPAT_TEXTURE( SamplerLUT4, vec2( blue2, green ));
     res = mixfix(color1, color2, mixer);
     // float l = mix(length(imgColor.rgb), length(res.rgb), 0.4);
     // res.rgb = normalize(res.rgb + 1e-10)*l;
  }
1 Like

Yes, commenting the two lines gives 100% accurate lut output. OTOH the changes are affecting the brightness only.

1 Like

OK, i put together another release version.

Changes:

  • compatibility with lut’s on nVidia cards should be fixed or at least improved
  • added the Mask gamma parameter. It allows to separately choose the gamma of mask application. Some masks look better with lower gamma down to 1.0.

Download link:

https://mega.nz/file/x4ZzCa7D#K3giLcRKOpjJFkab_02--s0sfCgsJA1uB1Cob01LBJA

8 Likes

@guest.r

I think the horizontal phosphor bloom can only be completely eliminated with 100% mask strength, which is obviously too dark for 99% of displays. Mask 8 is a 75% reduction in brightness(!). So yeah you really need that bloom to keep the image adequately bright, but it looks very unnatural and distracting with the three color masks. So, I’ve discovered yet another limitation to emulating CRT masks on a digital display.

I think the best way to solve this is to just use one of the two color masks, rather than trying to turn everything upside down and do something that the display/shader really isn’t designed to do.

So I’ve come full circle: back to using cgwg aperture!

Speaking of cgwg aperture, why does the grey ramp look so weird, here? Is this something to do with sharpness? Screenshots look good but in-game it looks weird. This could be my display doing something, hard to tell. Plasmas can do strange things sometimes.

edit: I haven’t tried the latest latest version, maybe there are some tricks there I haven’t tried yet.

shaders = "7"
shader0 = "shaders_slang/misc/grade.slang"
filter_linear0 = "false"
wrap_mode0 = "clamp_to_border"
mipmap_input0 = "false"
alias0 = "StockPass"
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/crt-gdv-new/afterglow0.slang"
filter_linear1 = "false"
wrap_mode1 = "clamp_to_border"
mipmap_input1 = "false"
alias1 = "AfterglowPass"
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/crt-gdv-new/pre-shaders-afterglow.slang"
filter_linear2 = "false"
wrap_mode2 = "clamp_to_border"
mipmap_input2 = "false"
alias2 = "LinearizePass"
float_framebuffer2 = "true"
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/crt-gdv-new/avg-lum.slang"
filter_linear3 = "true"
wrap_mode3 = "clamp_to_border"
mipmap_input3 = "true"
alias3 = "AvgLumPass"
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/crt-gdv-new/blur_horiz2.slang"
filter_linear4 = "true"
wrap_mode4 = "clamp_to_border"
mipmap_input4 = "false"
alias4 = ""
float_framebuffer4 = "false"
srgb_framebuffer4 = "false"
scale_type_x4 = "absolute"
scale_x4 = "800"
scale_type_y4 = "source"
scale_y4 = "1.000000"
shader5 = "shaders_slang/crt/shaders/guest/crt-gdv-new/blur_vert2.slang"
filter_linear5 = "true"
wrap_mode5 = "clamp_to_border"
mipmap_input5 = "false"
alias5 = "GlowPass"
float_framebuffer5 = "false"
srgb_framebuffer5 = "false"
scale_type_x5 = "absolute"
scale_x5 = "800"
scale_type_y5 = "absolute"
scale_y5 = "600"
shader6 = "shaders_slang/crt/shaders/guest/crt-gdv-new/crt-guest-dr-venom2.slang"
filter_linear6 = "true"
wrap_mode6 = "clamp_to_border"
mipmap_input6 = "false"
alias6 = ""
float_framebuffer6 = "false"
srgb_framebuffer6 = "false"
scale_type_x6 = "viewport"
scale_x6 = "1.000000"
scale_type_y6 = "viewport"
scale_y6 = "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;PR;PG;PB;AS;sat;TNTC;CP;CS;WP;wp_saturation;GAMMA_INPUT;lsmooth;SIZEH;GLOW_FALLOFF_H;SIZEV;GLOW_FALLOFF_V;glow;bloom;TATE;IOS;OS;BLOOM;gamma_c;brightboost;brightboost1;gsl;scanline1;scanline2;beam_min;beam_max;beam_size;vertmask;scans;spike;h_sharp;s_sharp;csize;bsize;warpX;warpY;shadowMask;masksize;maskDark;maskLight;CGWG;mcut;slotmask;slotwidth;double_slot;slotms;mclip;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 = "7505.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"
PR = "0.140000"
PG = "0.140000"
PB = "0.140000"
AS = "0.080000"
sat = "0.100000"
TNTC = "0.000000"
CP = "0.000000"
CS = "0.000000"
WP = "0.000000"
wp_saturation = "1.000000"
GAMMA_INPUT = "2.400000"
lsmooth = "0.900000"
SIZEH = "4.000000"
GLOW_FALLOFF_H = "0.300000"
SIZEV = "4.000000"
GLOW_FALLOFF_V = "0.300000"
glow = "0.000000"
bloom = "0.000000"
TATE = "0.000000"
IOS = "0.000000"
OS = "1.000000"
BLOOM = "0.000000"
gamma_c = "1.000000"
brightboost = "1.000000"
brightboost1 = "1.500000"
gsl = "2.000000"
scanline1 = "6.000000"
scanline2 = "18.000000"
beam_min = "1.500000"
beam_max = "1.000000"
beam_size = "1.000000"
vertmask = "0.000000"
scans = "1.000000"
spike = "0.000000"
h_sharp = "3.000001"
s_sharp = "1.000000"
csize = "0.000000"
bsize = "600.000000"
warpX = "0.000000"
warpY = "0.000000"
shadowMask = "0.000000"
masksize = "1.000000"
maskDark = "0.500000"
maskLight = "1.000000"
CGWG = "0.500000"
mcut = "1.150000"
slotmask = "0.000000"
slotwidth = "2.000000"
double_slot = "1.000000"
slotms = "1.000000"
mclip = "0.500000"
inter = "350.000000"
interm = "1.000000"
gamma_out = "2.400000"
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"
1 Like

You can have partial 100% mask strength with the 5-7 masks. Alas it’s not promising to invest too much time into full 100% masks without a proper display and adapting the viewing distance, because viewing distances averages the very small image parts. It’s a good practice though, if you buy a decent upgrade.

My display can also do funky things, even with screenshots! Display technology, related with crt emulation, is definitely more important than considered by many users.

You can try the Mask gamma. :grinning: It’s pretty nice setting to have, since you don’t need to search for a compromise with input/output gamma values regarding mask application distribution.

2 Likes

Not the intended use but Lut 2 with no masks looks great on my CRT.

2 Likes

Needed to adjust the trinitron masks 5&6 a bit more. It should look nicer. The saturation is now distributed towards edges of the beam, which cancels over-saturating the image and it also corresponds with actual trinitron masks better.

Otherwise some minor parameter tweaks.

Download link (25.11.2020_release_1):

https://mega.nz/file/E1AFzSKD#_18PDFGPBMSFo2haGV590EjbC6Dm4ixVKweWY4imq_8

4 Likes

I found a bug when using curvature.

  1. https://pasteboard.co/JC1agDo.png -Curvature

  2. https://pasteboard.co/JC19Y8g8.png -Without curvature

Everything else works fine.

1 Like

Thanks! It was a quite elusive bug, present with glcore and vulkan, D3D11 seems OK. Thankfully adapting the preset a bit should solve it.

1 Like

@guest.r

What do you think about removing the bright boosts altogether? With all of the autocorrection stuff happening behind the scenes, it seems like bright boost can only make the image objectively worse.

I’m getting the best results I’ve seen by disabling bright boost (setting both to 1.00) and working solely with the beam shape parameters.

1 Like