New CRT shader from Guest + CRT Guest Advanced updates

It can be used with any display resolution. Best looking masks are the ones with width 3 or 4.

Best to give it a try, see if it fits into a preset design.

4 Likes

New Release Version (2023-05-17-r1):

Notable changes:

  • two mask zoom factors are available now, 150% and 167%
  • first works better with 2 or 4 width masks, second with 3 width masks
  • small tweak to the slotmask mitigation code

Download link:

https://mega.nz/file/YsAWwCQb#M_fITRb-AsFCjb469pAQ4PbsFt5VdkWcdwwmZU_5qTI

11 Likes

This sounds interesting. I’ll be checking this out later thank you.

Also @guest.r have you figured out what’s going on with the new grade not playing nice with your shader? Dogway suggests that grade should be the first pass, while I understand that I would also like to keep my presets the way they’ve always been with grade being the 3rd pass (I think it’s 3rd or maybe 4th) in my preset shader chain. It’s been working correctly that way up to now so I don’t understand why I would have to switch that up now. I would love to test the new grade out but I’m stuck before I can try anything.

1 Like

My color altering (and afterglow) shader passes are color neutral with default setting, so you can replace an early stock shader with the new grade without issues. It will run a notch slower, but barely noticable.

2 Likes

Ok I’ll give that a try later. If worse come to worse I’m fine with just sticking to the old grade. Kind of didn’t want two sets of “color altering” shader passes in the chain even though yours gives neutral colors with default settings.

1 Like

Another scaled mask 6 screenie:

This time the new scaling factor of 5/3 or 1.666667 is used.

7 Likes

Using the reshade port with PCSX2 standalone.

2 Likes

New Release Version (2023-05-18-r1):

Notable changes:

  • mask zoom overhaul
  • each mask can be individually scaled up to 4 stages
  • slotmask adaptation mode for mask scaling added

Each mask (width) likes it’s different scaling factor better, now this is implemented. Works very nice with most situations. Slotmask can be scaled by interpolation or just widened. I guess this brings more very nice mask options for different display resolutions.

Edit: small improvement

Download link:

https://mega.nz/file/o4JUGTKQ#BH_3jEtNW3JpMBOCegQozWwlG59qXYk-QKbzVrr5LTc

11 Likes

Looking forward to trying this new feature. It seems like the best thing we never knew we needed until we saw it.

This might solve/enhance a couple situations at both 4K and 1080p for me. Situations where the Mask is either too coarse, leading to harshness and errors in rendering for example spikes, dots or colours appearing “outside the lines” of sprites or text or where the Mask is too fine, which makes it near impossible to appreciate the grid-like, textured appearance of the Mask itself at higher resolutions unless sitting very close to the screen.

Hopefully this middle ground would work just as well as its integer based counterparts in terms of subpixel awareness and accuracy (meaning the appearance of RGB triads won’t be affected).

Thanks again @guest.r for thinking outside the box!

4 Likes

Very good, first of all to congratulate you on your work. I’ve been looking for my perfect shader for a couple of nights. Would there be a way to implement a system to modify the number of scanlines that appear on the screen? I find them very large and separated for my taste. Thank you.

1 Like

The number of scanlines is not an arbitrary quantity. it’s supposed to be half the number of vertical pixels in 240p aka double strike mode. You can alter the shape of the scanlines as well as the intensity of the gaps in between the scanlines.

There’s a highly integrated shader called Mega Bezel Reflection Shader which has something called fake scanlines and also Opposite Dir. Scanline Multiplier which allows you to increase or decrease the number of scanlines. This will negatively affect the quality of your rendering due to misalignment of scanlines as graphics would have been originally designed with the standard number of scanlines in mind.

3 Likes

So now with the latest implementation how do I achieve a 167% Mask Zoom with, say, mask 6? Which value do I have to use? CRT Mask Zoom: 2?

Or for mask 10, for a 150% zoom, Mask Zoom: 1?

1 Like

@Cyber I have not completely understood 240p. Is it just doubling 240x2=480 and render even and odd numbers from frame to frame so you have this black gap between scanlines and maybe afterglow effect? And in the end 240p only supports 25Hz or 30Hz refresh rates? And if this is emulated with a shader vsync should be enabled for 60Hz output?

1 Like

Previous implementation had this issues / calculations. Now you can just increase the mask width (by 2.0 in your both cases, to answer your question) and an artifact free zoomed mask will be calculated.

Since the zoomed mask is wider, 150%, 167% etc. still applies to some situations, but now the optimal stretch is individually calculated for each mask and you can stretch/zoom the mask up to 4 additional widh size.

4 Likes

Firstly, I’m not an expert on TV technology but without Googling this is my understanding of how 240p aka Double Strike works.

Normally in an NTSC signal you have about 480 lines of vertical resolution or 480 horizontal lines drawn on the screen every frame. This happens approximately 30 times every second. However not all of the lines are drawn at the same time. Half are drawn (the odd lines) then the other half is drawn (the even lines). This happens 60 times per second. Each half of a frame is called a field. So a typical 15KHz CRT display draws 60 interlaced 240 line fields per second.

In comes 240p/Double-Strike, its called double strike because instead of the beam aiming for the next line down each field, the beam draws over the same line for 2 fields then skips a line and draws the next line but since this is the entire frame that is being drawn not half of the frame it is incorrect to call these fields being drawn. They are actually complete frames being drawn, which is why 240p games on a typical 15KHz CRT actually run at 60fps, not 30fps.

The lines that the electron beam actually strikes are the scanlines while the black gaps which are the skipped lines are just the gaps in between the scanlines.

Many times people confusingly use scanlines to refer to both interchangeably.

https://www.hdretrovision.com/240p

https://junkerhq.net/xrgb/index.php/240p_video

4 Likes

Thanks for explanation and video! Need to think about it. There are games like secret of mana which switch between interlaced and progressive output for text. If a shader emulates double dash with pronounced gaps it should check if progressive is used. If vertical resolution is always the half maybe something like „ if (res.x/res.y > 2.0) „ check could be used.

2 Likes

In my adventure to get the Mega Bezel to guess the proper aspect ratio based on the core resolution I don’t remember many resolution aspect ratios larger than 2.

If you want to see what resolution the core is outputting at different times you can try a STD preset from the Mega Bezel and turn on the resolution debug text which is the second parameter in the parameter list.

It’s on my list to extract this as its own shader/preset so it can just be added with the shader prepend/append

6 Likes

@HyperspaceMadness Thanks for the info. I will take a look at a STD preset.

For now i‘m sobered up about adding bigger gaps for progressive resolutions. I have experimented with secret of mana and there is always a brightness jump if text shows up. This leads me to the next two questions. Does „double strike“ produce brighter colors because phosphor „cool down“ phase is much lower? Does progressive produce some blur, because a analogue electron beam does not always hit the same position 100% twice?

A crt has the ability to draw a 480 lines canvas, 15000 times (lines) per second, if you do the math 15000 / 480 gives us around 30 times per second. At double strike mode (as called by Nintendo) the beam draws 240 lines instead and we get a solid 60 frames by drawing every second line only and leaving the other blank.

15000 times is a fixed value (or else called 15khz TV ).

2 Likes

@DariusG That’s right. But if you draw a frame twice you have 60fps but content obly changes after every second frame.

According to this thread phosphor could be brighter in 240p mode. Red phosphor looks strange :flushed:. https://forums.nesdev.org/viewtopic.php?t=9922&start=60