Dunno about the stuff around the edges, but I think the stuff in the middle is moire lines. Are you warping the mask, too, by chance?
Yes, I’ve swapped the texcoords mask input function by the “pp warped”. Should I revert?
Yeah, leave the mask unwarped. The difference is almost imperceptible, but it avoids a lot of ugly side effects.
It fixed the center artifacts.
The edge ones continue, though:
Looks like the cornersmooth code has some issue.
Looks good. I’m curious about mask 19? It’s makes my laptop with a 1650 slow down immediately.
After some careful side-by-side comparisons, I think I’d have to say that gaussian looks better for the vertical filter. Sinc yields some unnatural and awkward results when a very dark line is next to a very bright line. Example can be seen circled below.
What does sinc horizontal and gaussian vertical look like?
Hey! New to the forums here, but you might know me as V15UAL K3YS in the Retroarch discord.
I came across this thread and have been researching and trying out various CRT shaders, trying to find the best one. I particularly like a lot of Nesguy’s configurations thanks to the level of detail, being able to see the phosphor detail amongst the scanlines. I’ve been trying to find a good configuration for crt-guest-dr-venom, since I find it is the best crt shader for handling interlaced content (such as Tekken 3 in 480i). It also works great for PS1 games that swap back and forth between resolutions, such as Gran Turismo and Jet Moto 2 (both which run at 480i in menus but in-game are 240p).
I took one of Nesguy’s more recent configurations for crt-guest-dr-venom in this thread and applied some tweaks. I changed the color settings for NTSC-U and lowered the gamma so it wasn’t as bright. I find that this looks great on my 40" 1080p flat-panel TV, which I have the backlight maxed out on. I also applied mask #2 and I think it looks great.
If anyone has any suggestions or different configurations, I am open to hearing them. I also have a 1440p 27" monitor I test these on as well. NOTE: I took these images with integer scaling disabled, as I find this shader to handle non-integer scaling quite well compared to other shaders like CRT-Aperture.
I just created an account so it won’t let me post more pictures in my post. I’ll post another in a separate post for how it looks via 240p in Wipeout XL.
Time to update crt-hyllian-glow.
The old crt-hyllian-glow wasn’t very well calibrated. Gamma was totally off. Now it’s fixed and the halation effect is very subtle, as it should be.
I’ve managed to use all files from glow folder, so the hyllian-glow folder is not necessary anymore. It uses default crt-hyllian shader, so no need to duplicate code. The curvature code is reused from resolve.slang inside glow (as all it has inside: masks, noise, etc). Beware that curvature inside resolve.slang is buggy and produce artifacts. So to use crt-hyllian-glow you just need to put the slang preset at the crt folder.
Here’s the preset (included crt-hyllian shader inside zip if you don’t have it):
Tried to make as sharp as possible. I used hylian crt shader. Not sure why it looks so dark, looks better in game… fullscreen view is recomended.
It’s normal for screenshots that are properly bright to look overly dark when scaled down; this is a result of scaling the mask/scanlines.
In fact, if a screenshot looks adequately bright in a thumbnail it’s probably way too bright in-game.
Thank you for the explanation mr Nesguy. It looks alright in game, but I really should buy a brighter tv I think … this ones old, even for a lcd.
Ah, I see what’s up. You had the corner function multiplying the coords themselves, which was causing funky stuff at the edges (and beyond; notice the area outside the image is a weird non-black color). Since it spits out a float value, you can just multiply the whole output by it and it will give you nice, clean, fully black edges:
FragColor = vec4(color, 1.0);
FragColor *= (param.CURVATURE > 0.5) ? corner(pp) : 1.0;
I can almost read that code now
Makes you feel like a big kid don’t it lol
Nah, Iam too far gone for that.
Thanks! It works like a charm!! Do you know why the resolve.slang inside glow shader is buggy??
Anyway, here are some screens:
A gaussian-sinc version, I see. I’ll make that, it should present intermediate results.
Do you mean the awful moire artifacts? That’s unfortunately very common with curvature added after a scanline pass. You can use a heavily anti-aliased curvature, like the one from royale’s last pass (expects linear gamma) or the ewa-curvature shader (very demanding, unfortunately), or you can use noise to compensate (small amounts will just replace the lines with noise but larger amounts will hide it).
I went with the noise when I added curvature to crtglow
Looks great. Here are some recent settings for the new version of guest-dr-venom, LMK what you think. For the second shot I just switched to mask 0 and increased mask strength to 70%.
Looks brighter in-game than in a scaled screenshot.
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;mask_gamma;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 = "7005.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.100000"
TATE = "0.000000"
IOS = "0.000000"
OS = "1.000000"
BLOOM = "0.000000"
gamma_c = "1.140000"
brightboost = "1.000000"
brightboost1 = "1.100000"
gsl = "2.000000"
scanline1 = "8.000000"
scanline2 = "12.000000"
beam_min = "1.500000"
beam_max = "1.000000"
beam_size = "0.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 = "8.000000"
masksize = "1.000000"
maskDark = "0.500000"
maskLight = "1.500000"
CGWG = "0.600000"
mcut = "1.150000"
mask_gamma = "2.400000"
slotmask = "0.000000"
slotwidth = "2.000000"
double_slot = "1.000000"
slotms = "1.000000"
mclip = "1.000000"
inter = "350.000000"
interm = "1.000000"
gamma_out = "2.200000"
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"