New CRT shader from Guest + CRT Guest Advanced updates

Yes, thats is a good one.

Greetings.

@guest.r

Is there a mask configuration that will result in something like newpixie’s mask?

2 Likes

Nothing out of the ordinary in terms of brightness / contrast, on the TV it’s just at default settings, I rarely fiddle around there. In this case, this was run under XP with an old Radeon, so the catalyst control center could play a role in theory. Looking in the settings, I had gamma at 0,95 and brightness at 106, default is 100. Turning things lower makes the mask more proununced I guess, nothing in terms of notable scanlines appears.

2 Likes

newpixie’s mask is a very simplistic function that just draws vertical lines every 1/3 of a pixel: https://github.com/libretro/slang-shaders/blob/master/crt/shaders/newpixie/newpixie-crt.slang#L188

2 Likes

Is that a GPU with composite/svideo output on the board? Or are you using something like crt-emudriver to produce 240p signals over VGA? If the former, that’s putting out 480i, which won’t have the thick gaps between scanlines that doublestrike/“240p” has. On a high-enough-quality set, you can see them with a fast shutter speed on the camera but on most consumer sets the phosphors hold onto the previous field long enough that it looks like a steady, constant image (by design, since you don’t want your 480i TV programs to be jittering up and down noticeably all the time).

1 Like

Of course, that’s 240p via Scart / VGA. :smiley:

Picture difference between 480i and 240p is visible of course, but not manifesting through notable scanlines.

The GPU also has S-Video, and there is a visible difference between RGB 480i and S-Video 480i, but I doubt the phone cam I’m using could capture it. Shots taken from my VGA monitor come out better. It’s not like the TV is particularly sharp (probably also showning it’s age) but you might as well think I’m running composite with most of the pics I’ve taken.

2 Likes

Yeah, one kind of odd thing newpixie seems to do is draw the mask overtop the glow

4 Likes

Probably. I had a crappy 20" Sanyo TV and it still had scanlines… :man_shrugging:

1 Like

I prefer this behavior tbh, even if it isn’t “accurate”, it’s just another thing that tricks the eye (very well imho; albeit from a distance)

2 Likes

I used TV’s with masks like that. But it was very new, I don’t remember which manufacturer they were from.

Well, I just like to use scanlines like Lottes masks 2 or 3. But now I’m using the interlacing setting that HyperspaceMadness explained to me, but with Lottes mask 4, as it was the closest I could get to that look. Maybe I can do this using slotmask together with Lottes mask 2 and interlacing.

*edit: can do something similar with mask 8 and slotmask

shadowMask = “8000000”
maskstr = “1,000000”
slotmask = “1,000000”
slotms = “2.000000”

3 Likes

I was also wondering, is it possible that there is something like component video being played on a Sony Trinitron?

I played Mega Drive on a Wega at an event, the Sonic 1 waterfall was transparent and everything was very sharp. I saw this also on a Brazilian channel that I follow, where it shows side-by-side the component video vs rgb: https://youtu.be/SBhz9QCKFa4

*At 2:42 minutes is where Sony TVs appear.

1 Like

AFAIK, the main difference between YPbPr and RGB is that the former has half the color bandwidth of the latter. You should be able to simulate that in GTU by reducing the I and Q bandwidth but keeping a high bandwidth for Y/luma.

5 Likes

I modified mask 7 to darken every third pixel, I think I like how it looks.

pos.x = fract(pos.x/3.0);

7 Likes

The new ‘RF’ NTSC preset can look very nice:

Otherwise the sequence of images looks much more consistent than a screenie.

I’m making some changes to the shaders and presets, should turn out nicely.

8 Likes

It looks sharper than the ntsc version. This image is wonderful to me!! :star_struck: :star_struck:

@guest.r, why don’t you remove crt-guest-advanced-ntsc and add ntsc signals to crt-guest-advanced?

1 Like

It’s mostly because of filtering, because ntsc passes scale the original image horizontally with some harsh transitions, which isn’t covered properly by the standard version. Smart edge interpolation is useless here for example, because it enhances some pesky situations, TATE code is useless etc.

Nevertheless, changes are coming to the ntsc preset too, namely for better deconvergence and higher resolution content handling and ofc. new ntsc shader versions will be included.

7 Likes

I’ve been playing around with the deconvergence and a seeing how I could optionally add the crt mask on top of glows. This is really as simple as just multiplying the glow by the mask before application:

Glow = mix(Glow, cmask*cmask*cmask*Glow, GDV_GLOW_CRTMASK_AMOUNT);

Here’s my tester:

Default

Default with LOTS of Glow

Applying the crt mask to the glow

A different crt mask on the glow

Here’s a close up image

All this makes me wonder if it’s possible to do the assembly of the glow, halation & bloom in the deconvergence pass. This way we could possibly deconverge before the mask which would allow more deconvergence without smearing.

It seems like the code for applying all the glow & bloom would probably need to be in both the crt pass and the deconvergence pass to allow the user to apply the deconvergence before or after the mask.

This is all just hypotheses floating around my head I haven’t tested out trying to split it like this yet :wink:

6 Likes

I’ve mentioned my thoughts on behind-the-mask glow in the past, but I don’t know if I’ve mentioned that the glass internal reflections definitely bounce back onto the mask and make a sort of front-lit effect that looks a bit like those behind-the-mask pics, though I think it would be more like raising the black level of the mask in the affected area rather than it glowing in the same color as the underlying pixels.

So, there may be room for, say, a relatively tight, over-the-mask halo for the direct glow and then a larger, behind-the-mask halo of raised black level and/or reduced contrast, where the light bounces back and illuminates the screen from the front.

2 Likes

Yeah the mask directly applied to the glow is definitely pure imagination, not based on reality :wink:

Yeah I think that’s a bit what I’ve seen in really close shots of CRTs where it seems like the aperture wires are being reflected and you’re right that the illumination did not seem to be colored.

And there’s the aperture grill thing where you seem to see the grill

5 Likes