Please show off what crt shaders can do!

Yeah, I don’t like mixing shader code with frontend image handling because RetroArch isn’t the only program that uses libretro’s shaders. I know Snes9x standalone and IIRC OpenEmu can load our shaders, which is awesome, but if we add a bunch of RetroArch-specific stuff in there, users of those other programs will have a degraded experience.

Similarly, the MAME ‘lay’ format is really powerful and handles a lot of the scaling stuff and has hooks into the emulation core for dynamic things like number displays, which is super-cool, but supporting it in RetroArch was a pretty big hassle and will need to be repeated for each video/context driver (I’m sure much of the code can be abstracted and reused, but not all of it, certainly), and any of the features that hook into the core were just stubbed out, leading to artwork that looks incomplete or worse in RA. I wouldn’t want to inflict this situation on every program that wants to load our shaders.

1 Like

Yes, I made some changes to the preset while working on a monitor with an incorrect sharpness setting, which was smearing the aperture grille and affecting color tint and brightness, so the current settings are all out of whack. Update to the preset is still pending, I believe.

For now try this:

CRT gamma:  2.50
Gamma signal type: SMPTE-C
Gamma in/out: 3.50
Bright boost (dark/bright pixel): 1.00
Beam shape high: 100.00 
Scanline saturation: 0.50

These are for a dim room; in a bright room you should raise dark/bright pixel bright boost to no higher than 1.35, beyond that you get hard clipping. Dark/bright pixel bright boost should be raised by the same amount if you want to avoid messing with the gamma curve.

Dim room

Bright room

1 Like

I realized that the dark pixels probably need to be boosted a lot more than the bright pixels due to the beam width variation. With no precise way to calculate this, I just eyeballed it using the test pattern. Bright pixel bright boost should go no higher than 1.30 and dark pixel bright boost can be eyeballed using the color bars pluge pattern.

This is with dark pixel BB at 1.90 and bright pixel BB at 1.30: (increase backlight to 100%):

4 Likes

Ngl, this seems interesting @Nesguy but, I can’t fully get behind it because of lack of mask.

Like it’s looking nicer and nicer with each update, but the lack of mask is killing it for me.

Just my personal opinion.

2 Likes

Yeah I can appreciate that, I like masks too. I like high TVL and low TVL CRTs for different reasons. Obviously the goal here is a high TVL CRT, or a really high-end consumer CRT like a Sony FV310. If you examine the gaps between scanlines closely on one of those you’ll see that they are mostly completely black and vary only in width.

The reason such dramatic scanlines look amazing, IMO, is because of local contrast. Yes, it helps soften the image to a certain extent via cognitive filters, but it also greatly increases the local contrast around highlights. When you have a very bright color next to a very dark color, the bright stands out even more. The greater beam width variation further adds to the sense of depth. So I do think there are ways in which the image on a high TVL CRT is objectively superior: local contrast, dynamic range, depth. Low TVL CRTs have an image that is softer, yes, but also undoubtedly flatter and less dynamic.

Most LCDs are probably closer to 200 nits when calibrated to 6500K as this seems to be the sweet spot for gamma and grey scale. So if you want scanlines like those seen on a high TVL CRT monitor or even a high-end CRT TV then you need all the brightness just for scanlines. It’s just really hard/impossible to match the peak brightness of a CRT phosphor when using masks and that kills it for me.

The technical limitations of doing mask emulation have been discussed at length elsewhere, but basically you need 8K to do anything close to a realistic slotmask emulation, while 1080p at 5x scale sans mask already perfectly matches the vertical granularity of an average slotmask CRT, which has around 5 phosphor triads per scanline.

1 Like

When you get some free time I’d be interested in seeing a mask version of this setup tbh.

I’m going to try out the current maskless setup though.

I’m currently testing a setup with no curvature, and have been enjoying it so far.

Also sorry for the lack of updates on the arcade stick front, I’ve been working on my stick lately and haven’t really had the time for much else.

1 Like

Since I’m basically maxing out the scanlines the thing to do would be to subtract darkness from scanlines while adding the same amount of darkness to the mask, that way you get an equally bright image and keep the dynamic range.

At 1080p I would first try GDV slotmask, cgwg aperture grille or dotmask and the Lottes stretched dot mask. I’ve been tinkering with these and they seem to be the best ones, but I haven’t come up with anything that I’m completely satisfied with yet. CGWG seems kind of pointless at normal viewing distances and can do strange things to a display since it’s messing with the subpixels. What mask would you use?

Don’t you find it interesting that the granularity of a typical slotmask crt is the same as a 1080p lcd without a mask?

I tend to use either guest mask 2 or 5/6, can’t remember which of the two 5 or 6 is correct at 1080p off the top of my head.

1 Like

Eh, I remember issues with both of those but I’ll take another look.

Basically I tend to use an apeture grille style mask.

GDV slotmask at 100%, bloom at 50%, beam shape high at 50% and dark/bright pixel BB at 1.90/1.30.

5 Likes

Here are few shaders I’ve been working with. Each has something I like and dislike. (These looks way better if you open in a new window.) Guest Venom

Mame_hlsl with Aperture Grille

Mame_hlsl with Shadow Mask

Crt Royale

Finally, Mame_Hsls with a 4x upscale on the PS1.

1 Like

2 and 5 looked the best mask wise. Royale looks like caca.

2 has some nice color going on.

Also I’m just partial to apeture grilles lol.

I find Royale (The Kurozumi preset) limited and harsh, but I love that dotty blurry bloom you get with the big chunky pixels. I can’t seem to do that with other shaders.

I agree with you on the apeture grille masks. They look less artificial on modern tv’s. Also Royale images look the worse scaled down. Fullscreen in a new windows is better.

I was sorta able to recreate that bloom effect somewhat with guest-dr-venom by changing some code. But I’ve been a lazy POS the last couple months and haven’t felt like working on anything.

I feel the lazy POS part. Bad times on this burning sphere lately.

Thing that sucks is I’ve done a far bit of work just can’t be assed to finish it lmfao

@Syh what do you think of my most recent screenshot? I’m pretty happy with the way it looks in full screen mode. This is 100% mask strength, no clipping or crushed blacks and maxing out brightness. I’ve only been able to achieve this with the GDV slotmask.

I don’t have a strong preference for any particular mask type, I think they’re all interesting in their own way. Aperture grille is tricky for various reasons, though. I haven’t been able to get a satisfactory (IMO) result using cgwg aperture.

Are you able to actually see phosphors at anything less than 100% strength when using cgwg aperture in fullscreen mode?

1 Like

I like it, not the biggest fan of slotmask if I’m going to be completely honest.

I’ll have to test it sometime this week as I normally use mask 5 or 6 when I’m not using hunters sub-pixel masks.

Is the mask you’re referring to mask 2 or 0? It’s been a minute can’t remember off the top of my head

CGWG aperture is mask 0 in GDV.

Here are some recent experiments.

Here is the mask working as intended- you can tell because the lcd subpixels appear to be reversed. This display is normally BGR, but when you shut off every other subpixel using a magenta/green pattern, it becomes RGB:

The above is with the mask at 100% strength. The apparently reversed subpixel order indicates that the mask is actually working. If you lower the mask strength at all or add bloom, this is what happens:

Now the mask isn’t doing anything other than making the image darker.

Here is just a plain white screen so you can see the lcd subpixels.

At anything less than 100% strength, cgwg aperture doesn’t do anything except darken the image. At 100% strength it’s too dark and causes weird lcd inversion artifacts on some displays.

The alternative aperture grilles aren’t any better, as far as I can tell.

It should be pointed out that many of these effects/drawbacks aren’t noticeable in a direct screen capture and only show up when actually playing a game in fullscreen mode.

Edit: does anyone have any guesses as to why these subpixels are so weird? It’s like there are subsubpixels of the same color that light up independently, and it’s terrible.