Please show off what crt shaders can do!

@Mickevincent Thanks! I did a bunch of tests and I don’t think I can improve on it. With a brighter display you can use higher values for the beam shape high parameter, maybe up to 150.00. To completely eliminate all bloom with white pixels requires 200.00 or 250.00, I think. That would require probably OLED without automatic brightness limiting (probably involving some kind of dangerous firmware hack) or maybe a QLED with really good local dimming to keep the black level low when the backlight is cranked up.

Bright boost can’t go higher than 1.30, and should probably come down to 1.25 or 1.20 (or lower!) on higher-contrast and brighter displays.

I’m still trying to figure out some default settings. I assume most people are not going to have a custom LUT for Retroarch. @Dogway what are the best grade settings to use if people aren’t going to color manage retroarch / do any LUTing? I assume we want:

CRT gamma: still use the same recommendations for region
gamma type: sRGB
phosphor type: none
signal type: sRGB
display color space: sRGB

white point: not sure. I can go as high as 7000K before there’s any clipping, with hard clipping around 7200K. But 6500K is the spec for sRGB so maybe we should just do that?

In short, if we’re not going to color manage RA should we just set everything to the spec for sRGB? Or will it still be more accurate to set everything to the region-specific settings?

Also, when we make a LUT, I assume we want to make a separate LUT for PAL and NTSC color spaces? Or do want to make a LUT only to use with a wider display gamut and make the LUT for that gamut? Would choosing that display gamut in our graphics card settings be a faster but less accurate way of accomplishing the same thing?

@hunterk

Is restoring permissions something I need to do, or does this happen on a timer or something…? I didn’t quite get what you meant by that (talking about Github). :sweat_smile:

1 Like

When our servers got hacked, the attacker got access to a key to my github account, so we revoked all of the account’s keys, access and privileges. Now that the keys are all revoked, we should be able to restore the privileges, which include the ability to merge changes to the repo, but we haven’t gotten around to doing so yet.

3 Likes

Random play in camera shots between LCD and CRT:

Here’s the shader,

shaders = "10"
shader0 = "shaders_slang/crt/shaders/guest/lut/lut.slang"
filter_linear0 = "false"
wrap_mode0 = "clamp_to_border"
mipmap_input0 = "false"
alias0 = ""
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/color-profiles.slang"
filter_linear1 = "true"
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/d65-d50.slang"
filter_linear2 = "true"
wrap_mode2 = "clamp_to_border"
mipmap_input2 = "false"
alias2 = "WhitePointPass"
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/afterglow.slang"
filter_linear3 = "true"
wrap_mode3 = "clamp_to_border"
mipmap_input3 = "false"
alias3 = "AfterglowPass"
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/avg-lum.slang"
filter_linear4 = "true"
wrap_mode4 = "clamp_to_border"
mipmap_input4 = "true"
alias4 = "AvgLumPass"
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/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/blur_horiz.slang"
filter_linear6 = "true"
wrap_mode6 = "clamp_to_border"
mipmap_input6 = "false"
alias6 = ""
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/blur_vert.slang"
filter_linear7 = "true"
wrap_mode7 = "clamp_to_border"
mipmap_input7 = "false"
alias7 = "GlowPass"
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/linearize_scanlines.slang"
filter_linear8 = "true"
wrap_mode8 = "clamp_to_border"
mipmap_input8 = "false"
alias8 = ""
float_framebuffer8 = "true"
srgb_framebuffer8 = "false"
scale_type_x8 = "source"
scale_x8 = "1.000000"
scale_type_y8 = "source"
scale_y8 = "1.000000"
shader9 = "shaders_slang/crt/shaders/guest/crt-guest-dr-venom.slang"
filter_linear9 = "true"
wrap_mode9 = "clamp_to_border"
mipmap_input9 = "false"
alias9 = ""
float_framebuffer9 = "false"
srgb_framebuffer9 = "false"
scale_type_x9 = "viewport"
scale_x9 = "1.000000"
scale_type_y9 = "viewport"
scale_y9 = "1.000000"
parameters = "TNTC;CP;CS;WP;wp_saturation;SW;AR;PR;AG;PG;AB;PB;sat;lsmooth;GAMMA_INPUT;TAPSH;GLOW_FALLOFF_H;TAPSV;GLOW_FALLOFF_V;TATE;IOS;OS;BLOOM;brightboost;brightboost1;gsl;scanline1;scanline2;beam_min;beam_max;beam_size;h_sharp;s_sharp;csize;bsize;warpX;warpY;glow;shadowMask;masksize;vertmask;slotmask;slotwidth;double_slot;slotms;mcut;maskDark;maskLight;CGWG;gamma_out;spike;inter;interm;bloom;scans"
TNTC = "1.000000"
CP = "0.000000"
CS = "0.000000"
WP = "-100.000000"
wp_saturation = "1.100000"
SW = "0.000000"
AR = "0.000000"
PR = "0.000000"
AG = "0.000000"
PG = "0.000000"
AB = "0.000000"
PB = "0.000000"
sat = "0.000000"
lsmooth = "0.500000"
GAMMA_INPUT = "2.400000"
TAPSH = "1.000000"
GLOW_FALLOFF_H = "0.000000"
TAPSV = "1.000000"
GLOW_FALLOFF_V = "0.000000"
TATE = "0.000000"
IOS = "0.000000"
OS = "1.000000"
BLOOM = "0.000000"
brightboost = "1.000000"
brightboost1 = "1.150000"
gsl = "2.000000"
scanline1 = "15.000000"
scanline2 = "23.000000"
beam_min = "1.000000"
beam_max = "1.700000"
beam_size = "0.000000"
h_sharp = "8.000000"
s_sharp = "0.000000"
csize = "0.000000"
bsize = "600.000000"
warpX = "0.020000"
warpY = "0.030000"
glow = "0.000000"
shadowMask = "-1.000000"
masksize = "1.000000"
vertmask = "0.000000"
slotmask = "0.000000"
slotwidth = "2.000000"
double_slot = "1.000000"
slotms = "1.000000"
mcut = "0.200000"
maskDark = "0.500000"
maskLight = "1.500000"
CGWG = "0.300000"
gamma_out = "2.600000"
spike = "0.000000"
inter = "400.000000"
interm = "1.000000"
bloom = "0.000000"
scans = "1.000000"
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"
7 Likes

I guess you are emulating a CRT with RGB signal type right? Aside of that, before I was color managing I used the color mangler controls mostly. Something along these lines:

rg = "0.020000"
rb = "0.000000"
gr = "0.000000"
gb = "0.050000"
br = "0.000000"
bg = "0.100000"

Then the spec for a sRGB is a gamma of 2.40, internally this is offset to 2.222 (I did so for a direct signal comparison) so compensate for that with 2.522 gamma. This is for a dim surround.

About temperature, I found 6504K to be totally valid for a RGB signal type in case you want to emulate a BVM or these top grade monitors.

1 Like

Yes, assume we’re talking about a CRT using an RGB signal.

Okay that makes sense, 2.5 is what I’ve been using but that was just eyeballing it. Are you saying even higher settings are appropriate in a bright room?

I still don’t really get the color LUT stuff though, still haven’t dived into that. Is this just for using a calibrated profile? So, we calibrate to sRGB or Rec 2020 or whatever the display’s native gamut is, then choose the appropriate option for display gamut within grade? I guess if we want to be lazy and less accurate, we just set our monitor to the widest gamut using the graphics card and skip the LUT part, and still select the appropriate option for display gamut in grade.

What about the crt phosphor gamut option? Do we need a wider gamut than sRGB for this, or does sRGB suffice?

1 Like

There are 2 gammas at work in the shader, input gamma and output gamma. You can’t change output gamma though as this is bound to the output color space. If you are in a dim to bright surround sRGB is fine, if you are in a dim to dark surround 709 is more appropriate, and if you are in a dark surround and have the gamut to spare DCI-P3 (2.6 gamma) is even more appropriate.

The input gamma is also stuck at 2.40 (the // OETF line) as this is how the gamma is encoded in the image (no developer confirmed how they extract gamma encoded colors, so sRGB assumed).

The gamma_in value exposed is a bit on the artistic side. Really it should only be 2.222 for Composite, or 2.522( 2.40 with the offset) for RGB. Other than that it’s an artistic contribution to the monitor gamma which as we know it varied a lot in practical terms, so it’s ok to run this out of spec.

There are 2 LUT entries the first is for artistic purposes, the second is designed more for color management. You calibrate your monitor, then use the second LUT entry with a HALD CLUT to color manage Retroarch. For example in my case I calibrated to sRGB, process everything in sRGB and use a (sRGB) LUT on the second entry. You can calibrate to DCI, process everything in DCI and also use a (DCI) LUT on the second LUT entry.

I’m not sure about the phosphor’s gamut, haven’t checked if they fall within sRGB. But having a wide gamut always helps whatever color work you do.

1 Like

Could i trouble you for your DC settings. I’ve been trying to get DC to look like that forever but im too danged dumb! LOL

@SuperDerpBro Sure, what resolution are you running in: 4k, or 1080?

1080p :slight_smile:

(Post must be at least 20 characters. So here are some characters)

Mame_hlsl does not like 1080p as much as 4k. It is difficult to work with in general. I had to switch the mask to an aperture grille but hopefully it makes those 2d dreamcast games look a little better:

shaders = "13"
shader0 = "shaders_slang/misc/grade.slang"
filter_linear0 = "true"
wrap_mode0 = "clamp_to_border"
mipmap_input0 = "false"
alias0 = ""
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/crtsim/composite.slang"
filter_linear1 = "true"
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/mame_hlsl/shaders/mame_ntsc_encode.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/mame_hlsl/shaders/mame_ntsc_decode.slang"
filter_linear3 = "true"
wrap_mode3 = "clamp_to_border"
mipmap_input3 = "false"
alias3 = "NTSCPass"
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/mame_hlsl/shaders/mame_color.slang"
filter_linear4 = "true"
wrap_mode4 = "clamp_to_border"
mipmap_input4 = "false"
alias4 = "ColorPass"
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/mame_hlsl/shaders/mame_prescale.slang"
filter_linear5 = "true"
wrap_mode5 = "clamp_to_border"
mipmap_input5 = "false"
alias5 = "PrescalePass"
float_framebuffer5 = "false"
srgb_framebuffer5 = "false"
scale_type_x5 = "viewport"
scale_x5 = "1.000000"
scale_type_y5 = "viewport"
scale_y5 = "1.000000"
shader6 = "shaders_slang/crt/shaders/mame_hlsl/shaders/mame_deconverge.slang"
filter_linear6 = "true"
wrap_mode6 = "clamp_to_border"
mipmap_input6 = "false"
alias6 = "DeconvergePass"
float_framebuffer6 = "false"
srgb_framebuffer6 = "false"
scale_type_x6 = "viewport"
scale_x6 = "1.000000"
scale_type_y6 = "viewport"
scale_y6 = "1.000000"
shader7 = "shaders_slang/crt/shaders/mame_hlsl/shaders/mame_scanline.slang"
filter_linear7 = "true"
wrap_mode7 = "clamp_to_border"
mipmap_input7 = "false"
alias7 = "ScanlinePass"
float_framebuffer7 = "false"
srgb_framebuffer7 = "false"
scale_type_x7 = "viewport"
scale_x7 = "1.000000"
scale_type_y7 = "viewport"
scale_y7 = "1.000000"
shader8 = "shaders_slang/crt/shaders/mame_hlsl/shaders/mame_defocus.slang"
filter_linear8 = "true"
wrap_mode8 = "clamp_to_border"
mipmap_input8 = "false"
alias8 = "FocusPass"
float_framebuffer8 = "false"
srgb_framebuffer8 = "false"
scale_type_x8 = "viewport"
scale_x8 = "1.000000"
scale_type_y8 = "viewport"
scale_y8 = "1.000000"
shader9 = "shaders_slang/crt/shaders/mame_hlsl/shaders/mame_post.slang"
filter_linear9 = "true"
wrap_mode9 = "clamp_to_border"
mipmap_input9 = "false"
alias9 = "PostPass"
float_framebuffer9 = "false"
srgb_framebuffer9 = "false"
scale_type_x9 = "viewport"
scale_x9 = "1.000000"
scale_type_y9 = "viewport"
scale_y9 = "1.000000"
shader10 = "shaders_slang/crt/shaders/mame_hlsl/shaders/mame_phosphor.slang"
filter_linear10 = "true"
wrap_mode10 = "clamp_to_border"
mipmap_input10 = "false"
alias10 = "PhosphorPass"
float_framebuffer10 = "false"
srgb_framebuffer10 = "false"
scale_type_x10 = "viewport"
scale_x10 = "1.000000"
scale_type_y10 = "viewport"
scale_y10 = "1.000000"
shader11 = "shaders_slang/crt/shaders/mame_hlsl/shaders/mame_chroma.slang"
filter_linear11 = "true"
wrap_mode11 = "clamp_to_border"
mipmap_input11 = "false"
alias11 = "ChromaPass"
float_framebuffer11 = "false"
srgb_framebuffer11 = "false"
scale_type_x11 = "viewport"
scale_x11 = "1.000000"
scale_type_y11 = "viewport"
scale_y11 = "1.000000"
shader12 = "shaders_slang/crt/shaders/mame_hlsl/shaders/mame_distortion.slang"
filter_linear12 = "true"
wrap_mode12 = "clamp_to_border"
mipmap_input12 = "false"
alias12 = "DistortionPass"
float_framebuffer12 = "false"
srgb_framebuffer12 = "false"
scale_type_x12 = "viewport"
scale_x12 = "1.000000"
scale_type_y12 = "viewport"
scale_y12 = "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;Tuning_Sharp;Tuning_Persistence_R;Tuning_Persistence_G;Tuning_Persistence_B;Tuning_Bleed;Tuning_Artifacts;NTSCLerp;NTSCArtifactScale;animate_artifacts;ntscsignal;scanlinetoggle;chromatoggle;distortiontoggle;phosphortoggle;screenscale_x;screenscale_y;jitter;scanline_crawl;screenoffset_x;screenoffset_y;swapxy;humbaralpha;humbar_hertz_rate;shadowtilemode;shadowalpha;shadowcount_x;shadowcount_y;shadowuv_x;shadowuv_y;mask_offset_x;mask_offset_y;chromamode;conversiongain_x;conversiongain_y;conversiongain_z;power_r;power_g;power_b;floor_r;floor_g;floor_b;avalue;bvalue;ccvalue;ovalue;pvalue;scantime;notch_width;yfreqresponse;ifreqresponse;qfreqresponse;jitter_offset;col_rr;col_rg;col_rb;col_gr;col_gg;col_gb;col_br;col_bg;col_bb;col_offset_x;col_offset_y;col_offset_z;col_scale_x;col_scale_y;col_scale_z;col_saturation;converge_x_r;converge_x_g;converge_x_b;converge_y_r;converge_y_g;converge_y_b;radial_conv_x_r;radial_conv_x_g;radial_conv_x_b;radial_conv_y_r;radial_conv_y_g;radial_conv_y_b;scanlinealpha;scanlinescale;scanlineheight;scanlinevariation;scanlinebrightscale;scanlinebrightoffset;scanline_jitter_amount;defocus_x;defocus_y;phosphor_r;phosphor_g;phosphor_b;ygain_r;ygain_g;ygain_b;chromaa_x;chromaa_y;chromab_x;chromab_y;chromac_x;chromac_y;distortion_amount;cubic_distortion_amount;distort_corner_amount;round_corner_amount;smooth_border_amount;vignette_amount;reflection_amount;noise_amt;prescale"
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.050000"
g_mid = "0.000000"
wp_temperature = "5505.000000"
g_sat = "0.200000"
g_vibr = "0.000000"
g_satr = "-0.150000"
g_satg = "-0.150000"
g_satb = "0.000000"
g_lift = "0.000000"
blr = "0.000000"
blg = "0.000000"
blb = "0.000000"
wlr = "0.950000"
wlg = "1.000000"
wlb = "1.000000"
rg = "0.000000"
rb = "-0.055000"
gr = "0.000000"
gb = "0.000000"
br = "0.000000"
bg = "0.000000"
LUT_Size1 = "32.000000"
LUT1_toggle = "0.000000"
LUT_Size2 = "32.000000"
LUT2_toggle = "0.000000"
Tuning_Sharp = "0.100000"
Tuning_Persistence_R = "0.000000"
Tuning_Persistence_G = "0.000000"
Tuning_Persistence_B = "0.000000"
Tuning_Bleed = "0.200000"
Tuning_Artifacts = "0.000000"
NTSCLerp = "0.000000"
NTSCArtifactScale = "255.000000"
animate_artifacts = "1.000000"
ntscsignal = "0.000000"
scanlinetoggle = "1.000000"
chromatoggle = "1.000000"
distortiontoggle = "0.000000"
phosphortoggle = "1.000000"
screenscale_x = "0.000000"
screenscale_y = "0.000000"
jitter = "0.000000"
scanline_crawl = "0.000000"
screenoffset_x = "0.000000"
screenoffset_y = "0.001000"
swapxy = "0.000000"
humbaralpha = "0.000000"
humbar_hertz_rate = "0.001000"
shadowtilemode = "1.000000"
shadowalpha = "0.250000"
shadowcount_x = "3.000000"
shadowcount_y = "2.000000"
shadowuv_x = "0.500000"
shadowuv_y = "0.500000"
mask_offset_x = "0.000000"
mask_offset_y = "0.053000"
chromamode = "3.000000"
conversiongain_x = "0.000000"
conversiongain_y = "0.000000"
conversiongain_z = "0.000000"
power_r = "1.000000"
power_g = "1.000000"
power_b = "1.000000"
floor_r = "0.000000"
floor_g = "0.000000"
floor_b = "0.000000"
avalue = "0.500000"
bvalue = "0.500000"
ccvalue = "3.579545"
ovalue = "0.000000"
pvalue = "1.000000"
scantime = "88.999428"
notch_width = "2.500000"
yfreqresponse = "5.199997"
ifreqresponse = "1.200000"
qfreqresponse = "0.600000"
jitter_offset = "0.000000"
col_rr = "1.000000"
col_rg = "0.000000"
col_rb = "0.000000"
col_gr = "0.000000"
col_gg = "1.000000"
col_gb = "0.000000"
col_br = "0.000000"
col_bg = "0.000000"
col_bb = "1.000000"
col_offset_x = "0.000000"
col_offset_y = "0.000000"
col_offset_z = "0.000000"
col_scale_x = "0.950000"
col_scale_y = "0.950000"
col_scale_z = "0.950000"
col_saturation = "1.200000"
converge_x_r = "0.000000"
converge_x_g = "0.000000"
converge_x_b = "0.000000"
converge_y_r = "0.000000"
converge_y_g = "0.000000"
converge_y_b = "0.000000"
radial_conv_x_r = "0.000000"
radial_conv_x_g = "0.000000"
radial_conv_x_b = "0.000000"
radial_conv_y_r = "0.000000"
radial_conv_y_g = "0.000000"
radial_conv_y_b = "0.000000"
scanlinealpha = "0.599997"
scanlinescale = "0.499997"
scanlineheight = "0.700000"
scanlinevariation = "3.000001"
scanlinebrightscale = "1.499994"
scanlinebrightoffset = "0.000000"
scanline_jitter_amount = "0.250000"
defocus_x = "0.000000"
defocus_y = "0.200000"
phosphor_r = "0.450000"
phosphor_g = "0.450000"
phosphor_b = "0.650000"
ygain_r = "0.452600"
ygain_g = "1.000000"
ygain_b = "0.242200"
chromaa_x = "0.590000"
chromaa_y = "0.350000"
chromab_x = "0.310000"
chromab_y = "0.595000"
chromac_x = "0.155000"
chromac_y = "0.110000"
distortion_amount = "0.050000"
cubic_distortion_amount = "0.000000"
distort_corner_amount = "0.000000"
round_corner_amount = "0.050000"
smooth_border_amount = "0.030000"
vignette_amount = "0.080000"
reflection_amount = "0.050000"
noise_amt = "0.500000"
prescale = "1.000000"
textures = "MaskTexture;NTSCArtifactSampler;shadowMaskSampler;SamplerLUT1;SamplerLUT2;SamplerLUT3"
MaskTexture = "shaders_slang/crt/shaders/mame_hlsl/resources/aperture-grille.png"
MaskTexture_wrap_mode = "clamp_to_border"
MaskTexture_mipmap = "false"
NTSCArtifactSampler = "shaders_slang/crt/shaders/crtsim/artifacts.png"
NTSCArtifactSampler_linear = "true"
NTSCArtifactSampler_wrap_mode = "clamp_to_border"
NTSCArtifactSampler_mipmap = "false"
shadowMaskSampler = "shaders_slang/crt/shaders/crtsim/mask.png"
shadowMaskSampler_linear = "true"
shadowMaskSampler_wrap_mode = "clamp_to_border"
shadowMaskSampler_mipmap = "false"
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"

Thanks! :stuck_out_tongue:

I put that text into a txt file and renamed it snk.slangp … when i try to load it, it fails :confused: Obviously im doing something wrong… lol

Perhaps it is because I have the grade shader in there. I made another version with the default mame_hlsl and adjusted the settings. Try this:

shaders = "11"
shader0 = "shaders_slang/crt/shaders/mame_hlsl/shaders/mame_ntsc_encode.slang"
filter_linear0 = "true"
wrap_mode0 = "clamp_to_border"
mipmap_input0 = "false"
alias0 = ""
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/mame_hlsl/shaders/mame_ntsc_decode.slang"
filter_linear1 = "true"
wrap_mode1 = "clamp_to_border"
mipmap_input1 = "false"
alias1 = "NTSCPass"
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/mame_hlsl/shaders/mame_color.slang"
filter_linear2 = "true"
wrap_mode2 = "clamp_to_border"
mipmap_input2 = "false"
alias2 = "ColorPass"
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/mame_hlsl/shaders/mame_prescale.slang"
filter_linear3 = "true"
wrap_mode3 = "clamp_to_border"
mipmap_input3 = "false"
alias3 = "PrescalePass"
float_framebuffer3 = "false"
srgb_framebuffer3 = "false"
scale_type_x3 = "viewport"
scale_x3 = "1.000000"
scale_type_y3 = "viewport"
scale_y3 = "1.000000"
shader4 = "shaders_slang/crt/shaders/mame_hlsl/shaders/mame_deconverge.slang"
filter_linear4 = "true"
wrap_mode4 = "clamp_to_border"
mipmap_input4 = "false"
alias4 = "DeconvergePass"
float_framebuffer4 = "false"
srgb_framebuffer4 = "false"
scale_type_x4 = "viewport"
scale_x4 = "1.000000"
scale_type_y4 = "viewport"
scale_y4 = "1.000000"
shader5 = "shaders_slang/crt/shaders/mame_hlsl/shaders/mame_scanline.slang"
filter_linear5 = "true"
wrap_mode5 = "clamp_to_border"
mipmap_input5 = "false"
alias5 = "ScanlinePass"
float_framebuffer5 = "false"
srgb_framebuffer5 = "false"
scale_type_x5 = "viewport"
scale_x5 = "1.000000"
scale_type_y5 = "viewport"
scale_y5 = "1.000000"
shader6 = "shaders_slang/crt/shaders/mame_hlsl/shaders/mame_defocus.slang"
filter_linear6 = "true"
wrap_mode6 = "clamp_to_border"
mipmap_input6 = "false"
alias6 = "FocusPass"
float_framebuffer6 = "false"
srgb_framebuffer6 = "false"
scale_type_x6 = "viewport"
scale_x6 = "1.000000"
scale_type_y6 = "viewport"
scale_y6 = "1.000000"
shader7 = "shaders_slang/crt/shaders/mame_hlsl/shaders/mame_post.slang"
filter_linear7 = "true"
wrap_mode7 = "clamp_to_border"
mipmap_input7 = "false"
alias7 = "PostPass"
float_framebuffer7 = "false"
srgb_framebuffer7 = "false"
scale_type_x7 = "viewport"
scale_x7 = "1.000000"
scale_type_y7 = "viewport"
scale_y7 = "1.000000"
shader8 = "shaders_slang/crt/shaders/mame_hlsl/shaders/mame_phosphor.slang"
filter_linear8 = "true"
wrap_mode8 = "clamp_to_border"
mipmap_input8 = "false"
alias8 = "PhosphorPass"
float_framebuffer8 = "false"
srgb_framebuffer8 = "false"
scale_type_x8 = "viewport"
scale_x8 = "1.000000"
scale_type_y8 = "viewport"
scale_y8 = "1.000000"
shader9 = "shaders_slang/crt/shaders/mame_hlsl/shaders/mame_chroma.slang"
filter_linear9 = "true"
wrap_mode9 = "clamp_to_border"
mipmap_input9 = "false"
alias9 = "ChromaPass"
float_framebuffer9 = "false"
srgb_framebuffer9 = "false"
scale_type_x9 = "viewport"
scale_x9 = "1.000000"
scale_type_y9 = "viewport"
scale_y9 = "1.000000"
shader10 = "shaders_slang/crt/shaders/mame_hlsl/shaders/mame_distortion.slang"
filter_linear10 = "true"
wrap_mode10 = "clamp_to_border"
mipmap_input10 = "false"
alias10 = "DistortionPass"
float_framebuffer10 = "false"
srgb_framebuffer10 = "false"
scale_type_x10 = "viewport"
scale_x10 = "1.000000"
scale_type_y10 = "viewport"
scale_y10 = "1.000000"
parameters = "ntscsignal;scanlinetoggle;chromatoggle;distortiontoggle;phosphortoggle;screenscale_x;screenscale_y;jitter;scanline_crawl;screenoffset_x;screenoffset_y;swapxy;humbaralpha;humbar_hertz_rate;shadowtilemode;shadowalpha;shadowcount_x;shadowcount_y;shadowuv_x;shadowuv_y;mask_offset_x;mask_offset_y;chromamode;conversiongain_x;conversiongain_y;conversiongain_z;power_r;power_g;power_b;floor_r;floor_g;floor_b;avalue;bvalue;ccvalue;ovalue;pvalue;scantime;notch_width;yfreqresponse;ifreqresponse;qfreqresponse;jitter_offset;col_rr;col_rg;col_rb;col_gr;col_gg;col_gb;col_br;col_bg;col_bb;col_offset_x;col_offset_y;col_offset_z;col_scale_x;col_scale_y;col_scale_z;col_saturation;converge_x_r;converge_x_g;converge_x_b;converge_y_r;converge_y_g;converge_y_b;radial_conv_x_r;radial_conv_x_g;radial_conv_x_b;radial_conv_y_r;radial_conv_y_g;radial_conv_y_b;scanlinealpha;scanlinescale;scanlineheight;scanlinevariation;scanlinebrightscale;scanlinebrightoffset;scanline_jitter_amount;defocus_x;defocus_y;phosphor_r;phosphor_g;phosphor_b;ygain_r;ygain_g;ygain_b;chromaa_x;chromaa_y;chromab_x;chromab_y;chromac_x;chromac_y;distortion_amount;cubic_distortion_amount;distort_corner_amount;round_corner_amount;smooth_border_amount;vignette_amount;reflection_amount;noise_amt;prescale"
ntscsignal = "0.000000"
scanlinetoggle = "1.000000"
chromatoggle = "1.000000"
distortiontoggle = "0.000000"
phosphortoggle = "0.000000"
screenscale_x = "0.000000"
screenscale_y = "0.000000"
jitter = "0.000000"
scanline_crawl = "0.000000"
screenoffset_x = "0.000000"
screenoffset_y = "0.000000"
swapxy = "0.000000"
humbaralpha = "0.000000"
humbar_hertz_rate = "0.001000"
shadowtilemode = "0.000000"
shadowalpha = "0.330000"
shadowcount_x = "6.000000"
shadowcount_y = "12.000000"
shadowuv_x = "0.500000"
shadowuv_y = "0.500000"
mask_offset_x = "0.000000"
mask_offset_y = "0.000000"
chromamode = "3.000000"
conversiongain_x = "0.000000"
conversiongain_y = "0.000000"
conversiongain_z = "0.000000"
power_r = "1.000000"
power_g = "1.000000"
power_b = "1.000000"
floor_r = "0.000000"
floor_g = "0.000000"
floor_b = "0.000000"
avalue = "0.500000"
bvalue = "0.500000"
ccvalue = "3.579545"
ovalue = "0.000000"
pvalue = "1.000000"
scantime = "88.999428"
notch_width = "2.500000"
yfreqresponse = "5.199997"
ifreqresponse = "1.200000"
qfreqresponse = "0.600000"
jitter_offset = "0.000000"
col_rr = "1.000000"
col_rg = "0.000000"
col_rb = "0.000000"
col_gr = "0.000000"
col_gg = "1.000000"
col_gb = "0.000000"
col_br = "0.000000"
col_bg = "0.000000"
col_bb = "1.000000"
col_offset_x = "0.000000"
col_offset_y = "0.000000"
col_offset_z = "0.000000"
col_scale_x = "0.950000"
col_scale_y = "0.950000"
col_scale_z = "0.950000"
col_saturation = "1.200000"
converge_x_r = "0.000000"
converge_x_g = "0.000000"
converge_x_b = "0.000000"
converge_y_r = "0.000000"
converge_y_g = "0.000000"
converge_y_b = "0.000000"
radial_conv_x_r = "0.000000"
radial_conv_x_g = "0.000000"
radial_conv_x_b = "0.000000"
radial_conv_y_r = "0.000000"
radial_conv_y_g = "0.000000"
radial_conv_y_b = "0.000000"
scanlinealpha = "0.499996"
scanlinescale = "0.499997"
scanlineheight = "0.700000"
scanlinevariation = "3.000001"
scanlinebrightscale = "1.499994"
scanlinebrightoffset = "0.000000"
scanline_jitter_amount = "0.250000"
defocus_x = "0.000000"
defocus_y = "0.200000"
phosphor_r = "0.450000"
phosphor_g = "0.450000"
phosphor_b = "0.650000"
ygain_r = "0.452600"
ygain_g = "1.000000"
ygain_b = "0.242200"
chromaa_x = "0.590000"
chromaa_y = "0.350000"
chromab_x = "0.310000"
chromab_y = "0.595000"
chromac_x = "0.155000"
chromac_y = "0.110000"
distortion_amount = "0.050000"
cubic_distortion_amount = "0.000000"
distort_corner_amount = "0.050000"
round_corner_amount = "0.050000"
smooth_border_amount = "0.030000"
vignette_amount = "0.080000"
reflection_amount = "0.050000"
noise_amt = "1.000000"
prescale = "1.000000"
textures = "MaskTexture"
MaskTexture = "shaders_slang/crt/shaders/mame_hlsl/resources/aperture-grille.png"
MaskTexture_wrap_mode = "clamp_to_border"
MaskTexture_mipmap = "false"
1 Like

This one works. Thanks so much.

Which internal res do you recommend using with it? 1440x1080? Actually looks good at 960x720 too, heh.

Every time you increase the internal resolution knock the “Overall Scanline Scale” down. (I’m guessing .25 for a double res Dreamcast game.) Than adjust the maskscale X and maskscale Y until you get it how you like. (The Y value doesn’t do anything with the current apreture grill mask.) At 1920x1440 it looks like a Overall Scanline Scale =0.15 looks nice on Cannon Spike. If I cared to run at that resolution I’d probably tweak the mask scale more as well. I’d also recommend adjusting the Mask and Scanline intensity to your liking.

2 Likes

Thanks again. I’ll play around with it :smiley:

Here’s legend of dragoon with that shader. Is it your settings or Nesguys? It’s awesome anyway. *edit - Oops i were suppose to quote Puxirepublic, sorry

@Mickevincent those look like different settings to me. Those shots look pretty good but I don’t think my maxDR preset can be improved on very much; I’ve done a whole bunch of tests and spent a fair amount of time tweaking it. It’s as bright as it can get without introducing clipping or reducing the scanline strength. If someone can improve on it, I’d be happy to know. All my adjustments were made on a 400 nit display; with 500-600 nits you can probably increase beam max to around 150 or so.

A couple shots with current settings for maxDR. The update to the preset is still pending but I’ve posted current settings below. For NES all I did was change CRT gamma to 2.2 and use the composite-direct color palette.

shaders = "8"
shader0 = "shaders_slang/misc/grade.slang"
filter_linear0 = "true"
wrap_mode0 = "clamp_to_border"
mipmap_input0 = "false"
alias0 = "WhitePointPass"
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/afterglow.slang"
filter_linear1 = "true"
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/avg-lum.slang"
filter_linear2 = "true"
wrap_mode2 = "clamp_to_border"
mipmap_input2 = "true"
alias2 = "AvgLumPass"
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/linearize.slang"
filter_linear3 = "true"
wrap_mode3 = "clamp_to_border"
mipmap_input3 = "false"
alias3 = "LinearizePass"
float_framebuffer3 = "true"
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/blur_horiz.slang"
filter_linear4 = "true"
wrap_mode4 = "clamp_to_border"
mipmap_input4 = "false"
alias4 = ""
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/blur_vert.slang"
filter_linear5 = "true"
wrap_mode5 = "clamp_to_border"
mipmap_input5 = "false"
alias5 = "GlowPass"
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_scanlines.slang"
filter_linear6 = "true"
wrap_mode6 = "clamp_to_border"
mipmap_input6 = "false"
alias6 = ""
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/crt-guest-dr-venom.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;SW;AR;PR;AG;PG;AB;PB;sat;lsmooth;GAMMA_INPUT;TAPSH;GLOW_FALLOFF_H;TAPSV;GLOW_FALLOFF_V;TATE;IOS;OS;BLOOM;brightboost;brightboost1;gsl;scanline1;scanline2;beam_min;beam_max;beam_size;h_sharp;s_sharp;csize;bsize;warpX;warpY;glow;shadowMask;masksize;vertmask;slotmask;slotwidth;double_slot;slotms;mcut;maskDark;maskLight;CGWG;gamma_out;spike;inter;interm;bloom;scans"
g_gamma_in = "2.500001"
g_signal_type = "0.000000"
g_gamma_type = "0.000000"
g_crtgamut = "0.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 = "6505.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"
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.499996"
TAPSH = "4.000000"
GLOW_FALLOFF_H = "0.300000"
TAPSV = "4.000000"
GLOW_FALLOFF_V = "0.300000"
TATE = "0.000000"
IOS = "0.000000"
OS = "1.000000"
BLOOM = "0.000000"
brightboost = "1.250000"
brightboost1 = "1.250000"
gsl = "2.000000"
scanline1 = "1.000000"
scanline2 = "100.000000"
beam_min = "1.000000"
beam_max = "1.000000"
beam_size = "0.000000"
h_sharp = "3.000000"
s_sharp = "1.000000"
csize = "0.000000"
bsize = "600.000000"
warpX = "0.000000"
warpY = "0.000000"
glow = "0.000000"
shadowMask = "-1.000000"
masksize = "1.000000"
vertmask = "0.000000"
slotmask = "0.000000"
slotwidth = "2.000000"
double_slot = "1.000000"
slotms = "1.000000"
mcut = "0.250000"
maskDark = "0.500000"
maskLight = "1.500000"
CGWG = "0.500000"
gamma_out = "3.500000"
spike = "0.000000"
inter = "400.000000"
interm = "1.000000"
bloom = "0.000000"
scans = "1.000000"
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"
3 Likes

I’m going to do a pass on setting a common brightness of the different shader variants of the Mega Bezel and I was wondering if anyone had any suggestions about what should be the common brightness to match.

I was thinking to match Guest-Dr-Venom’s brightness as a starting point.

Any thoughts on what you would suggest as a common default brightness?


If there is anyone wondering what the Mega Bezel is, it’s this:

4 Likes

Guest-Dr-Venom is my base favorite. It seems to give the best results with the least amount of fuss. I’m not sure how it’s brightness is different compared to the other shaders.

4 Likes

It’s a tweak of default crt-guest-dr-venom.slangp. But Nesguy did inspire me in his thread of how thick scanlines got even look (especially 3D/240P contents) on 1080P/LCD.

I always want to get LCD + shader to accurately look to match the real high TVL CRT. Since I have 2 VGA CRT now, Trinitron and typically shadow mask one (which already take shots on that post), both 17" with native thick scanlines on 3840x240@120. Whether PC VGA CRT or P/BVM, in real thick scanlines depend on 2 conditions, high TVL (900+) and physics size (at least > 14").

I found guest.r’s shader with adjusted settings is the only one that accurately enough for the reals. Most P/BVM-like shaders got totally wrong way; They’re more like trying to simulate a CRT on camera shots, not IRL look.

2 Likes