New CRT shader from Guest + CRT Guest Advanced updates

Ah! So thats why it seemed inconsistant. To think I reinstalled the OS serveral times over because of this.

Sadly even if the egg is on flycast’s face it drips on to affected masks. Just when I thought I could make mask 6 submit to my insanity my prior mask 13 supremacy gets validation.

1 Like

Mask 11 seems unaffected. Moreover, an attempt at a “flycast friendly” config turned up this gem of a combo.

on a 4k display:

CRT Mask: 11.00
CRT Mask Size: 2.00
CRT Mask Zoom: -2.00

The result is a better version of the caligari style matrix effect I was going for in Opus. Hands down mask zoom is the best thing for preserving the LCD gamut since mask 13.

1 Like

Indeed, mask 11, size 2, - zoom can be a very nice aperture setup:

6 Likes

I believe I found a bug. When you disable the mask (by setting the CRT Mask parameter to -1.0), the screen gets all static-y, kinda like enabling the noise parameter but much worse. This happens in all the presets except for the Fastest preset:

Curiously, however, by enabling any amount of deconvergence, horizontal or vertical, it goes away.

EDIT: Turns out this only seems to happen when using the glcore driver. Vulkan and D3D11 don’t have this problem.

3 Likes

New Release Version (2023-07-11-r1):

Notable changes:

  • no-mask mode ‘fix’ and speedup
  • fastest version mask boost feature ‘re-enabled’, some other improvements

Download link:

https://mega.nz/file/x1AEhb6Q#r4aYjV8hEK-LSSbFHFkdRpiWWV4s3DzyW49VwtxQO9s

13 Likes

Greetings @guest.r, hope all is well. Any chance we might be able to get a mask pattern that looks like this when the phosphors aren’t energized?

5 Likes

You can more or less already achieve that using either negative values for the Glow parameter (shown below), or Magic Glow:

Though I have to say it’s not perfect. It seems to light up the surrounding “inactive” phosphors using roughly the same colors as the bright pixels that are causing the glow, so for example, the black area around Little Mac’s portrait is slightly tinted green since that’s what the color of his background’s portrait is, and it seems to me it should have a much more neutral tint.

7 Likes

I thought about this but didn’t think the dynamics were the same. Was just wondering if we could’ve gotten a dedicated implementation since it does seem like a real part of the CRT emulation experience that we might be missing out on.

Good attempt though!

2 Likes

Can also be achieved by raising the black level a little bit. Obviously not ideal.

3 Likes

Maybe not but I think it is realistic. I’m pretty sure the lighting conditions would have to be right to see the physical mask, and that would lower contrast.

e.g. the black level in the three shots above looks pretty high.

3 Likes

Seeing that we’re already close to achieving that look using the glow/magic glow effect. Maybe it might not be so difficult to implement the full effect in future shader revisions?

I think stuff like this is important to assist in things like the “natural” anti-aliasing and superior blending of pixels and edges that are characteristic of CRTs without resorting to simple blurs to ease the high contrast transitions, which usually tend to soften the image or contributes to a lack of focus.

What it appears like to me is that it could be functioning as a type of physical dithering pattern.

I’ve noticed that the same image with darker scanlines can look sharper but also less pixelated than the same image without scanlines or with lighter scanlines.

It’s possible that these vertical lines can have a similar effect on the image. Maybe that’s part of the “magic” that Magic Glow adds to the image as a side effect?

I’m not so concerned about Black Levels because as @Nesguy always said CRTs didn’t have perfect black levels although they were close enough to perfect.

I think the effect fails using Magic Glow because the luminance tapers from a high level to a low level, while what we would need for this effect would be an extremely low but static luminance level across the board. Only where the phosphors are lit is where the luminance would be higher than this level.

So in essence I think we can achieve this by simply having some “background” luminance applied to the Mask even when the phosphors are inactive. So instead of the Mask/Phosphors going all the way down to 0 (Off, black), Maybe they should go down to 2 or 1 or 0.2?

We could probably call it Magic Black Level or Mask Black Level? I’m sure @guest.r could come up with a better name if he so chooses to implement this.

1 Like

I’m testing it atm, should look like this:

11 Likes

Oh Wow @guest.r! This is brilliant! I think @HyperspaceMadness might also appreciate this very much since it’s something that he had pointed out that he noticed for a while. Thanks a mil for taking things even closer to the real thing!

4 Likes

Hi, I am kinda new to retroarch. Not a newb to emulation tho. I am wondering, where do I place the update? I have Sonkun’s shaders installed and working properly but uncertain about where I need to place the presets. Sorry for such a simple question

1 Like

I know it’s early days still but instead of this:

I’m seeing this:

20230713_123934

20230713_124020

So there’s a black halo?(shadow?) around the glowing phosphors. I think this might negate some of the blending properties of the effect even though you’ll still get to see the barely visible mask.

For the proper effect the phosphor must glow and blend on top of the energized mask with no black separation between the transition by default unless it is artificially added in case one would want more sharpness.

I think if you nail this, you might even be able to get away with less blur on the emulated phosphors themselves while still having smoother edges than what might have been possible before so the net effect might be a sharper, clearer image due to lower phosphor blur but smoother edges due to edges gradually fading into the inactive phosphor colour instead of a sharp black drop-off.

1 Like

One question: should this new effect be uniform all around the screen, or should it be stronger near actually illuminated phosphors? I would think it’d be the latter, and judging from pictures from the CRT thread in this forum, it would seem to bear out, but I can’t really say without an actual CRT in front of me, and even then I suspect other factors may come into play depending on the CRT and how it’s calibrated. And how would it play with the existing Glow and Halation parameters?

1 Like

I think this is your answer right here:

It’s the unenergized phosphors that can be “passively” visible so there’s no energy being applied to those to create any excitement of the phosphors and thus difference in light output. So of course it’s going to be uniform.

This is what Magic Glow already does brilliantly.

1 Like

Into the crt folder in the shaders_slang main folder. You don’t copy the base folder in the zip, but the folder’s content and you are good to go.

Yeah, i noticed it also, i guess this looks better:

6 Likes

Place the sonkun folder right into the shaders_slang folder and you should be good to go. Welcome to the forum by the way. If you have any other questions you can send to my thread as well right here:

1 Like

We both replied to him at the same time lol.

Also @guest.r while I’m at and since it seems you’re working on another update I have to bring this up again. If it’s possible can you try to make it to where I can place the new upgraded grade shader into my presets where I usually always have it placed? I know you said that the after glow pass wouldn’t affect anything and that I could just place grade above it, I tried that and it indeed works that way but I really don’t want to see two different types of color managing shaders in my presets.

I think it’s a issue with the LUT or something when I try to replace the “pre-shaders-afterglow” pass with grade, not exactly sure. If it’s not possible I’ll just leave this topic alone going forward.

2 Likes