New CRT shader from Guest + CRT Guest Advanced updates

New Release Version (29.12.2020-r1):

I’m finalizing the shader, mainly polishing new changes and cleaning some old issues. Performance and a reasonable implementation are a mighty priority and adding some in general complying effects gets increasingly complicated, so i guess this iteration of the shader is finished (minus possible bugs or a stroke-of-revelation improvement). I’m also very pleased the shader get’s along with other people’s excellent work. The shader still contains two, maybe three usable, but possible placeholder effects i won’t name. :grin:

Happy shading!

Notable changes:

  • some code cleanup
  • interlacing smoothing effect changed a bit, is a bit simpler but sufficient and more consistent.
  • brightness improvement with interlacing. The initial toxicity should be gone now…

Download link:

https://mega.nz/file/Q0hATaBA#FpYJnzYu3CJh0km2Z3zzxZZNcmKKnVytNr1BCin5TPg

14 Likes

Can you recreate and post this old preset of yours for the new GDV2 shader (not for HiRes if possible) :

1 Like

Hey there!

I guess it’s more appropriate to give a general working procedure to migrate older presets, since it’s quite simple.

  1. save a (vanilla) gdv2 preset under a custom name
  2. copy the parameters and values from the old preset to it. Save the file.
  3. load the preset and re-tweak brightness.

In this special case you should also change two parameter values:

  1. Increase “Interalcing effect Smoothness”
  2. Increase the “Mask 5-7 Low Strength” to 1.25 from 0.25
  3. re-tweak brightness
1 Like

New Release Version (31.12.2020-r1.2):

Notable changes:

I found some inspiration to greatly improve the LUT part of the shader composition. The LUT’s are still the same, one is added (credits to Torridgristle), but the patching is much more advanced than before. Using / replacing new LUT’s is much simpler now, even if they have flaws. Artifacts usually happen with darker colors and now, contrary to before, a shift is used to always use LUT colors instead of replacing them with original input colors. If used with very non-offensive brightness correction, the LUT effects are even better looking. Ofc. the corrections can be disabled. Also new is the parameter to chose between 32 and 64 LUT sizes. Size of 16 is not supported because of the worse quality and inappropriate parameter steps.

I also included some interlacing modes for better variety in the high-res repertoire.

Edit: Lut patching improved.

Download link:

https://mega.nz/file/llBTWAxQ#e27y-TcdbhxU44qAiIRwvUaNxjG9Jl5drtTSmrnL0eI

11 Likes

Nice job. All the artifacting with any of the luts is gone for me. Interlacing also looks very nice on Dreamcast.

3 Likes

Nice to hear that. :smile:

I also managed to improve the fidelity of the ‘lut patching’ effect regarding contrast and saturation. When i compared the versions notable differences were observable, but it’s more refined now, patching only where needed.

2 Likes

Do you intend to update the README file?

I am very happy with these updates that you are doing. Your shader is very complete.

Could you create a preset to mimic a VGA monitor? I use two shaders for this, but I would prefer to use only yours.

Thanks!

1 Like

This is great! I’m going to put the torridgristle’s LUT back in the mega bezel, Although it might wait until I upgrade it to the new Guest Venom.

I think it is the lut named other1.png. It really does a nice job of adjusting the blues :slight_smile: from more purply to more azure bluish.

1 Like

Found some sharpness settings that I like. Scanline spike removal at 0.00 causes some nasty artifacts.

subtractive sharpness 1.00
horizontal sharpness 3.00
scanline spike removal 1.00

2 Likes

I think it would be appropriate to have this reference, although i tried to make the parameter descriptions informative, maybe less formal. It’s sure better to put more time and effort than less into this.

Thanks. :smile: I think i managed to avoid regressions, but probably won’t add more features, since the shader can be used with other nice shaders etc.

Uhh…that’s a tough one. When you integrate the overlay, then you are halfway trough though. the problem from my side is i’m not appropriate to do the fine tuning. :grinning:

That’s nice to hear. The upgrade shouldn’t be too hard, but it’s still a nitpicky work. Other custom lut’s are also easier to integrate, but torridgristle’s are reffering to characteristics of specific displays though.

Dunno why, but that’s my favorite combo also. 0.0 for scanline spike removal is maybe OK with the newer Smart Edge Effect.

2 Likes

New Release Version (03.01.2021-r1):

Notable changes:

I noticed some inconsistencies with lut’s and managed to fix them after a while, now it takes much less offset to patch a lut, which also means original contrast and saturation. Blue ramp shows better results on last two samples. Otherwise it’s much simpler to add and manage a custom lut now.

Download link:

https://mega.nz/file/d1QWwLYD#t_bK7xDPiwtBer3SFVhqQBHk4sernHGQhbRQ0eeAlko

6 Likes

New Release Version (04.01.2021-r1):

Notable changes:

A bad regression crept in a while ago with substractive sharpness, which caused artifacting at edges and a sharper appearance where it shouldn’t. Fixed now. With recent versions i was more focused on other, filtering unrelated features, so it was here for a couple of versions. :woozy_face:

Download link:

https://mega.nz/file/4swmlLqK#QYOPUHRxXHTic815-cfDVmkr4fg9oymSt4F93On8LN0

8 Likes

I’m trying to get scanlines in PSX 480i games with GDV2, but it’s not working !

Preset with a stock pass before all the GDV2 passes :

shaders = "9"
shader0 = "shaders_slang/stock.slang"
wrap_mode0 = "clamp_to_border"
mipmap_input0 = "false"
alias0 = ""
float_framebuffer0 = "false"
srgb_framebuffer0 = "false"
scale_type_x0 = "absolute"
scale_x0 = "640.000000"
scale_type_y0 = "absolute"
scale_y0 = "240.000000"
shader1 = "shaders_slang/crt/shaders/guest/crt-gdv-new/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/crt-gdv-new/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/crt-gdv-new/pre-shaders-afterglow.slang"
filter_linear3 = "false"
wrap_mode3 = "clamp_to_border"
mipmap_input3 = "false"
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/crt-gdv-new/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/crt-gdv-new/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/crt-gdv-new/gaussian_horizontal.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 = "0.500000"
scale_type_y6 = "source"
scale_y6 = "1.000000"
shader7 = "shaders_slang/crt/shaders/guest/crt-gdv-new/gaussian_vertical.slang"
filter_linear7 = "true"
wrap_mode7 = "clamp_to_border"
mipmap_input7 = "false"
alias7 = "GlowPass"
float_framebuffer7 = "false"
srgb_framebuffer7 = "false"
scale_type_x7 = "viewport"
scale_x7 = "0.500000"
scale_type_y7 = "viewport"
scale_y7 = "0.500000"
shader8 = "shaders_slang/crt/shaders/guest/crt-gdv-new/crt-guest-dr-venom2.slang"
filter_linear8 = "true"
wrap_mode8 = "clamp_to_border"
mipmap_input8 = "false"
alias8 = ""
float_framebuffer8 = "false"
srgb_framebuffer8 = "false"
scale_type_x8 = "viewport"
scale_x8 = "1.000000"
scale_type_y8 = "viewport"
scale_y8 = "1.000000"
parameters = "bogus_afterglow;PR;PG;PB;AS;sat;bogus_color;TNTC;LS;LUTLOW;LUTBR;CP;CS;WP;wp_saturation;lsmooth;GAMMA_INPUT;bogus_interlacing;inter;interm;inters;iscan;bogus_glow;SIZEH;SIGMA_H;SIZEV;SIGMA_V;bogus_brightness;glow;bloom;gamma_c;brightboost;brightboost1;bogus_scanline;gsl;scanline1;scanline2;beam_min;beam_max;beam_size;vertmask;scans;spike;bogus_filtering;h_sharp;s_sharp;smart_ei;ei_limit;sth;bogus_screen;TATE;IOS;OS;BLOOM;csize;bsize;warpX;warpY;bogus_masks;shadowMask;maskstr;masksize;maskDark;maskLight;mcut;mask_gamma;slotmask;slotwidth;double_slot;slotms;mclip;gamma_out"
bogus_afterglow = "0.000000"
PR = "0.140000"
PG = "0.140000"
PB = "0.140000"
AS = "0.070000"
sat = "0.100000"
bogus_color = "0.000000"
TNTC = "0.000000"
LS = "32.000000"
LUTLOW = "5.000000"
LUTBR = "1.000000"
CP = "0.000000"
CS = "0.000000"
WP = "0.000000"
wp_saturation = "1.000000"
lsmooth = "0.750000"
GAMMA_INPUT = "2.400000"
bogus_interlacing = "0.000000"
inter = "350.000000"
interm = "1.000000"
inters = "0.000000"
iscan = "0.200000"
bogus_glow = "0.000000"
SIZEH = "5.000000"
SIGMA_H = "1.250000"
SIZEV = "5.000000"
SIGMA_V = "1.250000"
bogus_brightness = "0.000000"
glow = "0.080000"
bloom = "0.000000"
gamma_c = "1.000000"
brightboost = "1.400000"
brightboost1 = "1.100000"
bogus_scanline = "0.000000"
gsl = "1.000000"
scanline1 = "8.000000"
scanline2 = "8.000000"
beam_min = "1.600000"
beam_max = "1.300000"
beam_size = "0.600000"
vertmask = "1.000000"
scans = "0.600000"
spike = "1.000000"
bogus_filtering = "0.000000"
h_sharp = "3.000000"
s_sharp = "1.000000"
smart_ei = "0.000000"
ei_limit = "2.000000"
sth = "0.200000"
bogus_screen = "0.000000"
TATE = "0.000000"
IOS = "0.000000"
OS = "1.000000"
BLOOM = "0.000000"
csize = "0.000000"
bsize = "600.000000"
warpX = "0.000000"
warpY = "0.000000"
bogus_masks = "0.000000"
shadowMask = "5.000000"
maskstr = "1.000000"
masksize = "1.000000"
maskDark = "0.500000"
maskLight = "1.500000"
mcut = "2.000000"
mask_gamma = "2.400000"
slotmask = "0.000000"
slotwidth = "2.000000"
double_slot = "1.000000"
slotms = "1.000000"
mclip = "0.500000"
gamma_out = "2.200000"
textures = "SamplerLUT1;SamplerLUT2;SamplerLUT3;SamplerLUT4"
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"
SamplerLUT4 = "shaders_slang/crt/shaders/guest/lut/custom_lut.png"
SamplerLUT4_linear = "true"
SamplerLUT4_wrap_mode = "clamp_to_border"
SamplerLUT4_mipmap = "false"
1 Like

Hey there!

All shaders use OriginalSize in the main shader pass because scaling goes abroad with prior shaders, so changing resolution of any of the passes has no effect on scanline density.

You can still use the hires and ntsc versions and set the scanline resolution to 240p with a parameter. The hires version is quite fine, if you only want 240p.

2 Likes

At 1440p should I be using hires or normal version? Thanks for the hard work btw, Its been YEARS i’ve been messing with shaders and yours is the first one that works clearly out of the box and other than some over saturation from scanline saturation and some gamma tweaks its pretty much set without having to have a degree is CRT.

Edit: Also ive been increasing Lottes maskDark (with mask 1) to give the picture a brigher image that somehow gamma settings just don’t quite achieve. Its a wierd work around but I have yet to see a real downside to it?

1 Like

Ah, thanks. Also, what should the Mask gamma be? Same as gamma_in or gamma_out (I use 2.2 here)?

1 Like

Edit…oppsie, mask gamma. Lowering mask gamma produces a more coarse effect and greater neighbour pixel contrast. It’s really mask and taste/situation dependent. If you would use a normal png mask without linearization it would be equivalent to mask gamma 1.0.

Hey there! Normal is quite nice at 1440p and 4k also. The catch with hi-res version is a broader horizontal filter, so you can have some degree of smoothness with high resolution content, plus some specific features like internal resolution and red-blue deconvergence.

You can also try to change the mask gamma, i guess increasing it should do the trick in your situation. The downside is not too big, the contrast between adjacent output pixels is smaller and the overall image is brighter. Imo it’s quite important to be able to set the right amount of image brightness.

4 Likes

Thank you! I’m pretty happy with things now on the CRT side of things. The hires internal resolution feature was a life saver for the PSP. The PSP is awkward because it technically uses an LCD but most the games I play are ported from PS1/SNES (tactics games) so they all benefit from your filter.

Issue I was having was the psp needing an internal resolution increase to counter the need for a linier filter as it would have really odd pixel output without one. The resolution being so high was keeping me from using any CRT filters on it, but with the hires feature I actually have it all set up now!

Now to find a good handheld (gba/ds) LCD grid and scaling method, really not a fan of the fat grids I see out there.

1 Like

Thank you for this fix! I thought my mind was playing tricks on me because I noticed that in motion games would look sharper and pixelated, which I couldn’t figure out because still screenshots of the newer and older versions of GDV looked the same. Glad it wasn’t just me :sweat_smile::grin:

1 Like

Playing around with sharpness settings some more. I like this combo because it eliminates the artifacts resulting from subtractive sharpness while still keeping edges reasonably sharp. The scanlines look very natural on my plasma TV.

scanline spike removal 1.00
subtractive sharpness 0.50
horizontal sharpness 4.00

3 Likes