I’m running the new preset, and copied over all of the shader files as well. And they are in the correct folder.
Any error messages? You should run the presets from the included folder, without copying it to a different location for testing purpose. I would also need info about the gpu and video driver in retroarch.
I’m using the Metal version on a mid-2014 MacBook Pro with a GeForce GT 750M.
Looks like this is the error:
[ERROR] [Metal]: unable to compile fragment shader: Compilation failed:
program_source:109:19: error: reference to 'level' is ambiguous
res = level(param, param_1);
^
program_source:46:8: note: candidate found by name lookup is 'le[INFO] [Metal]: saving metal shader files to /Users/carlycoulter/Downloads/crt-gdv-new+ntsc-24.12.2020-release1/shaders/guest/crt-gdv-new/linearize-ntsc
Hmm…a function with the name ‘level’ already exists in Metal. Renamed the function, if there are other errors, you can post them here.
Download link (26.12.2020-r1):
https://mega.nz/file/tohHDaBL#HcMyil2N1lA6zD9IMA3-xmShC8P473OJCyJY0kDJ9pk
Edit: catching some poorly calculated pixels.
Yep, that fixed it!
Another nice update thanks
I’ll just report this since I’m noticing these while looking at the “temporal” interlace output.
Below is the original (non-shader) output of the car selection screen in the PSX game Motorhead. Below that two elements enlarged: the “X” button and part of the speed circle. It’s particular that small black dots appear on the X in the shader output and some small black line appears under the speed circle that are not there in the orginal. As said I’m noticing the black artifacts under the speed circle, when looking at the temporal interlace ouput of mode 1.00.
In the 2.00 “interpolated” setting they don’t appear.
It’s probably the same issue we talked about earlier, so no worry if it is, everything else is great. I thought I’d let you know anyway, since it provides an easy testcase.
Hmm…interlacing is a special situation, you must also consider scanlines (they aren’t empty), linearization of colors, linear interpolation in linear space, upscaling and last but not least the temporal smoothing effect as a whole. Prior implementation was very correct (by the definition of interlacing), and this is a cosmetic adaptation, but still quite correct. The black dots are in fact a representation of a pixel.
Edit: i have corrected the interlacing code a bit, some pixels might have better calculations.
I’m constantly jumping between masks 3 and 5. I just can’t seem to settle on one lol.
I find 3 looks similar to the TV sets I had here in the UK growing up. 5 looks like my late 90s Hyundai broadcast monitor.
Great work as always
Hello to everyone, until today i used a real CRT but i wait for more 2 years a working version of CRTSwitchres but nothing so i would move to shader’s magic world… I don’t know much about this topic but i am able to use it and i ask your help to understand the basics. Is needed a specific resolution to have better result or just full screen? I use scale integer option, I think it is necessary. There is a CRT shader that emulate very closely a real crt without too much configurations? Guest’s shaders seem excellent, do they need a particular configuration on a 2560x1440 lcd monitor? Many thanks and sorry for my bad english
I don’t use integer scaling at 1080p too often, the shader is OK, if you don’t push thinner scanlines. 1440p is a significant improvement over Full-HD with scanlines, the only persisting issue is which mask to use with this display resolution.
which one do you recommend?
It really depends from sharpness settings. The problem might be with masks 0,5 and 7 and masksize 1.0, because they are very fine at this resolution and i guess 27’’.
Ok, so integer scale is not necessari to have pixel perfect?
Not really, because the pixels are interpolated with functional algorithms. The main reason one would want to have integer scaling with 1440p and these shaders are thin scanlines. And you can use the shader built in integer scaling if it feels convenient.
As you can see, with an old CRT i plug it and play… with shader’s magic world i must study and understand many aspects that overlap… ok, i am studyng
New Release Version (28.12.2020-r1):
Notable changes:
- interlacing improved, probably final version
- interlacing smoothing improved
- Edit: interlacing smoothing improved
- Edit2: improve interlacing a bit
Download link:
https://mega.nz/file/sgpTTALb#5aqtpT23BVUOUIPaAzqO49wsF7uS1f23FIu0KrSIy7k
It could be the ‘completed ver. 2.0’, minus bugs. ofc. Feedback is welcome, as always.
Just wanted to drop in. I managed to update to the latest version (27.12.2020-r2.1), replacing the stock pass with Grade and copying over the parameters like you had suggested, works like a charm! Also managed to tweak my settings a bit with the new Smart Edge implementation, and got something that looks quite good imo. At 1440p Mask 1 looks very nice!
Here are some screenshots. The PS1 screenshots are with default settings except no dithering.
Here are the settings (I adjust the settings for grade on a per-region basis):
shaders = "8"
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 = "PrePass"
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/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/linearize.slang"
filter_linear4 = "true"
wrap_mode4 = "clamp_to_border"
mipmap_input4 = "false"
alias4 = "LinearizePass"
float_framebuffer4 = "true"
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/gaussian_horizontal.slang"
filter_linear5 = "true"
wrap_mode5 = "clamp_to_border"
mipmap_input5 = "false"
alias5 = ""
float_framebuffer5 = "false"
srgb_framebuffer5 = "false"
scale_type_x5 = "viewport"
scale_x5 = "0.500000"
scale_type_y5 = "source"
scale_y5 = "1.000000"
shader6 = "shaders_slang/crt/shaders/guest/crt-gdv-new/gaussian_vertical.slang"
filter_linear6 = "true"
wrap_mode6 = "clamp_to_border"
mipmap_input6 = "false"
alias6 = "GlowPass"
float_framebuffer6 = "false"
srgb_framebuffer6 = "false"
scale_type_x6 = "viewport"
scale_x6 = "0.500000"
scale_type_y6 = "viewport"
scale_y6 = "0.500000"
shader7 = "shaders_slang/crt/shaders/guest/crt-gdv-new/crt-guest-dr-venom2.slang"
filter_linear7 = "true"
wrap_mode7 = "clamp_to_border"
mipmap_input7 = "false"
alias7 = ""
float_framebuffer7 = "false"
srgb_framebuffer7 = "false"
scale_type_x7 = "viewport"
scale_x7 = "1.000000"
scale_type_y7 = "viewport"
scale_y7 = "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;bogus_afterglow;PR;PG;PB;AS;sat;bogus_color;TNTC;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"
g_gamma_in = "2.400000"
g_signal_type = "0.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 = "7004.000000"
g_sat = "0.150000"
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"
bogus_afterglow = "0.000000"
PR = "0.140000"
PG = "0.140000"
PB = "0.140000"
AS = "0.080000"
sat = "0.100000"
bogus_color = "0.000000"
TNTC = "0.000000"
CP = "0.000000"
CS = "0.000000"
WP = "0.000000"
wp_saturation = "1.000000"
lsmooth = "0.900000"
GAMMA_INPUT = "2.400000"
bogus_interlacing = "0.000000"
inter = "350.000000"
interm = "2.000000"
inters = "0.000000"
iscan = "0.200000"
bogus_glow = "0.000000"
SIZEH = "4.000000"
SIGMA_H = "0.500000"
SIZEV = "4.000000"
SIGMA_V = "0.500000"
bogus_brightness = "0.000000"
glow = "0.000000"
bloom = "0.100000"
gamma_c = "1.140000"
brightboost = "1.000000"
brightboost1 = "1.100000"
bogus_scanline = "0.000000"
gsl = "0.000000"
scanline1 = "6.000000"
scanline2 = "13.000000"
beam_min = "1.400000"
beam_max = "1.000000"
beam_size = "0.000000"
vertmask = "0.000000"
scans = "1.000000"
spike = "0.000000"
bogus_filtering = "0.000000"
h_sharp = "3.000001"
s_sharp = "1.000000"
smart_ei = "2.000000"
ei_limit = "3.000000"
sth = "0.300000"
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 = "1.000000"
maskstr = "0.300000"
masksize = "1.000000"
maskDark = "0.350000"
maskLight = "1.600000"
mcut = "1.150000"
mask_gamma = "2.400000"
slotmask = "0.000000"
slotwidth = "2.000000"
double_slot = "1.000000"
slotms = "1.000000"
mclip = "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"
Here are some screenshots for the same shader configuration in 480i (Tekken 3 for example). Interlace mode 2 looks very good!
New Release Version (28.12.2020-r2.2):
Notable changes:
- interlacing improved, probably final version
- interlacing gamma lowered to 75% of original setting. Linear filtering looks quite toxic with too high gamma, since it’s fixed by lookup coordinates. Should look much smoother now.
- Edit: glow settings re-tweaked to be more neutral.
- Edit2: small bugfix with deconvergence
Download link:
https://mega.nz/file/YshQzaaB#Raq940XkYfdab3LkOn-RKejeSqVNELyMboV9tzsxJ-A