Please show off what crt shaders can do!

Sure. Be mindful the Grade pass has Phosphur is set to -4 and the Lut Size 2 toggle is on. It made it more color accurate for towards the CRT screenshot you posted.

shaders = "10"
shader0 = "shaders_slang/stock.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/stock.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/misc/grade.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/misc/glass.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 = "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;g_csize;g_bsize;g_flicker;g_shaker;g_refltog;g_reflgrain;g_reflstr;g_fresnel;g_reflblur;gz;gx;gy;gzr;gzg;gzb;goxr;goyr;goxg;goyg;goxb;goyb;TO;PH;PER;ASAT;temperature;luma_preserve;wp_red;wp_green;wp_blue;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.100000"
g_signal_type = "1.000000"
g_gamma_type = "0.000000"
g_crtgamut = "-4.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 = "1.000000"
wp_temperature = "5505.000000"
g_sat = "0.000000"
g_vibr = "0.000000"
g_satr = "-0.150000"
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 = "32.000000"
LUT1_toggle = "0.000000"
LUT_Size2 = "32.000000"
LUT2_toggle = "1.000000"
g_csize = "0.000000"
g_bsize = "600.000000"
g_flicker = "0.000000"
g_shaker = "0.000000"
g_refltog = "1.000000"
g_reflgrain = "0.500000"
g_reflstr = "0.200000"
g_fresnel = "1.000000"
g_reflblur = "0.600000"
gz = "1.100000"
gx = "0.000000"
gy = "-0.010000"
gzr = "1.100000"
gzg = "1.010000"
gzb = "1.000000"
goxr = "0.000000"
goyr = "-0.010000"
goxg = "0.000000"
goyg = "-0.010000"
goxb = "0.000000"
goyb = "-0.010000"
TO = "1.000000"
PH = "2.000000"
PER = "0.750000"
ASAT = "0.200000"
temperature = "6500.000000"
luma_preserve = "1.000000"
wp_red = "0.000000"
wp_green = "0.000000"
wp_blue = "0.000000"
lsmooth = "0.900000"
GAMMA_INPUT = "2.400000"
TAPSH = "4.000000"
GLOW_FALLOFF_H = "1.000000"
TAPSV = "4.000000"
GLOW_FALLOFF_V = "1.000000"
TATE = "0.000000"
IOS = "0.000000"
OS = "1.000000"
BLOOM = "0.000000"
brightboost = "1.999999"
brightboost1 = "3.000000"
gsl = "0.000000"
scanline1 = "6.000000"
scanline2 = "8.000000"
beam_min = "1.450000"
beam_max = "1.050000"
beam_size = "0.700000"
h_sharp = "5.250000"
s_sharp = "0.400000"
csize = "0.000000"
bsize = "600.000000"
warpX = "0.000000"
warpY = "0.000000"
glow = "0.060000"
shadowMask = "1.000000"
masksize = "2.000000"
vertmask = "0.100000"
slotmask = "0.650000"
slotwidth = "6.000000"
double_slot = "2.000000"
slotms = "1.000000"
mcut = "0.250000"
maskDark = "0.650000"
maskLight = "1.500000"
CGWG = "0.300000"
gamma_out = "2.400000"
spike = "1.000000"
inter = "400.000000"
interm = "3.000000"
bloom = "0.000000"
scans = "0.500000"
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

Just playing around, haven’t had time to really optimize anything.

I’m not interested in recreating the red push or deconvergence seen in the photo, just using it as a reference for the mask and scanlines. I could probably brighten up the scanlines a bit to make it more like the photo but I think these are pretty decent.

3 Likes

mame_hlsl.slangp? Does anybody know how to fix the weird lego block artifacting that happens when you turn on it’s ntsc mode? It didn’t used to do that.

Changing the ntsc values helps but it’s not very intuitive. At best I felt I could get a value that looked ok with some games and terrible with others.

Can you post a screenshot of the problem? looks okay here:

I think this is getting close to that “my TV didn’t have scanlines” low TVL look. The bloom is overboard, but it kinda needs to be for this approach.

Lottes mask dark/light at 0.00/1.00, bright boost and bloom added to compensate.

NTSC-J phosphor primaries and 9300K temperature.

Images should be downloaded and viewed at original size at 1080p.

Same thing w/curvature, just for kicks.

and here’s a 300% zoom on Mario.

4 Likes

Problem might be the wrong word. I’ll also admit my ignorance to how ntsc signal artifacts are supposed to look on a real TV. I find the problems show up on colorful simple games like the Master System or NES. Here is a shot from Alex Kid from the default mame_hlsl with ntsc signal turned on. It looks very chunky to me but again maybe I just don’t know how ntsc is supposed to look.

It really shows up better in motion. I’ve used a lot of shaders, lots of them have distortions, but for some reason mame seems to go crazy in motion. I don’t know how well it shows up here, but you see the edge of the cliff behind Sonic? It kind of looks like the edge of a sawblade. It’s also on the palm leaves.

Looking at it now, it looks almost like the pixels are too big, or that every other scanline is a little to the right. I wonder if this is a problem exclusive to 4k. If it’s supposed to look like that, okay. But I don’t ever remember a tv doing this.

Also, the waterfalls have diagonal rainbow stripes on them.

The edge of those yellow blocks. That’s the thing I’m talking about. Now look closely at the sky in the background. See the faint diagonal lines? I have a hunch that that has something to do with it. Those diagonals seem to show up on fake transparency dithering in Genesis games. And when you move the whole thing kind of vibrates or flickers. But that might just be the Genesis. Those yellow blocks however: I’m seeing that sawtooth effect all over the place. And in motion, that stuff flickers or vibrates like crazy, and it starts showing up on everything. It’s like I’m watching through a basket made of glass.

@tpjunior Much of what you describe is what ntsc signal noise is supposed to do. I find mame_hlsl implementation of is to be a little to harsh. The composite pass in the crt/shaders/crtsim to allow more subtlety but less variety of noise type.

The jagged sawtooth effect and diagonal lines are both indeed legit NTSC effects. This page on NESdev provides a good reference:

https://wiki.nesdev.com/w/index.php/NTSC_video

And here’s a good explainer pic:

image

You can also see it in action in this set of comparison shots I took:

2 Likes

I don’t ugly, I want Hollywood ugly. Here are three comparisons of my “hand-me-down CRT”. The first is mame and the second composite. I noticed the referenced texture was not tiling correctly and so I fixed it and that is the third shot.

2 Likes

So the effect seems to be “dot crawl” and as far as I can tell, something called a “comb filter” mitigates it. And I could be wrong, but from what I’ve read and what little I could understand it seems that, as far as real TV sets are concerned, this is mostly a problem with PVMs. Which explains my problem. I’m trying to get it to look like a standard, off the shelf CRT from the early 90’s. Like when I was a kid. I feel like there is a huge emphasis in the emulation community on making retro games look like they’re being played on a PVM. That’s just not what I’ve been looking for.

The issue with mame_hlsl is the same issue I’m having with just about every shader; I like the look of an NTSC signal, but hate it by itself. And everything I layer on top seems to move it farther and farther away from the old RF/composite look. You can get close with some presets like Royale+NTSC Adaptive or Venom+NTSC if you tweak it a bit, but something is always off. And I’m starting to get the impression that half of it is just me remembering things as better looking than they were.

This right here was something I found wasting time on 4chan. It sums it up better than I can, though it does so in more confrontational way than I intend:

You see, I’m aiming for number four. What I usually get is number three with a little blur and some artifacts. Mame comes close, but I wish there was a way to dial that dot crawl back a notch.

I think your memory of off the shelf CRT from 90’s might be off. If you had a small 15 inch the scanlines were probably hard to read.

For me that that 4th picture of Link looks likes like a blurry camera shot of a blurry CRT. Here’s a quick go at it anyways. If you want to knock the ntsc jitter down up the NTSC Scanline Duration to 89.0. The higher the frequency the less notches. 01Zelda

3 Likes

@BendBombBoom nice work. Yeah, that’s definitely a lot worse than your average TV from the mid 80s to the 90s. That would have to be a very small CRT that was going bad.

I think black gaps between scanlines disappear completely when you have just one triad per scanline.

Can’t really count the triads because it’s an aperture grille, but I found this interesting. The image on the left is of a 8” PVM, 250 TVL.

3 Likes

Yeah, I’m sure my memory is off. That and my OCD freaking out. I think the scanlines may have always been there. I just didn’t notice the scanlines back in the day. Back then, you had to kind of back away from the TV, so you didn’t notice these things as much. Although, the picture you got there looks kind of like a way blurrier version of what I remember.

In the mame_hlsl shader parameters, there is a setting “NTSC Color Notch Filter Width.” I have no idea what that means nor what it does. It’s default is 1.00. I set it to 4.00. Looks fine now.

It’s a filter that applies over the area where luma and chroma signals overlap (I suspect the 1.0 value represents filtering between 3 and 4 MHz). You can widen the filter at the cost of horizontal sharpness. That’s probably why you associate the effect with PVMs, since it would make sense for them to use minimal filtering to preserve detail.

I found this video interesting:

Playing around I added the NTSC adaptive passes to both Venom and Mame and found the results to just the type of ugly I remember. Here is Earth Worm Jim with Venom, Venom + NTSC, and MAME + NTSC. The blending of dithering is best outside the artificial madapt. Mame has scrolling scanlines adds to the “organic” noise.
5 Likes

And another one with Shinobi III to show transparency and rainbowing. I’m starting to get a a fun range of CRT’s that I can cycle through and watch the signal get better or worse.

3 Likes