CRT-Yah! A new shader chain

A new version will arrive soon, with some improvements and additions based on your feedback.

  • Changed “Scanlines > Min. Width” parameter allowing -1 value for even thinner scanlines
    (requested by @PU786)
  • Inverted “Scanlines > Offset” parameter range to align with other offset parameters, where the Jitter variant is on the right/positive side (presets have been adjusted)
  • Improved automatic down-scale to better align scanlines with high-res details like text
  • Added “Sharpen > Amount” parameter to sharpen the general output
    (suggested by @Dante and others long ago :sweat_smile:)

    Also preserves some details of down-scaled images (requested by @Kefka2b)

Here are some examples for the new “Sharpen” parameter:

Sonic (NTSC) without shapening

Sonic (NTSC) with medium (1.0) shapening

R-Type Delta without sharpening (1x native)

R-Type Delta without sharpening (4x native, automatic down-scaled to 1x)

R-Type Delta with medium (1.0) sharpening (4x native, automatic down-scaled to 1x)

7 Likes

Hi - I love this shader. I have tweaked it to my liking and really enjoy it. Can I ask, is there a way to make it lighterweight when emulating PS2, Dreamcast, GameCube etc. For instance, are there parameters I could turn to 0 or remove from the chain but keep the mask and such to get a CRT look without over-processing the rest of it?

2 Likes

Hey, I’m glad you like it!

A few days ago, I silently release a new version, which brings a small performance boost (5-10%) across the board. When you update the slang shader in RetroArch, you should get the new version automatically. I’m still looking into more potential improvements.

In the meantime you can deactivate some effects, like the Halation effect by setting Intensity to 0. This effect uses a blurring filter that is applied to the source texture with a potentially large blurring kernel, depending on the Diffusion setting. For the mentioned systems and depending on the core settings the source texture size can be quite large: 1x native resolution is 480p, which could still be performant, but if you use 2x native resolution or higher, the performance will decrease quickly. Another potential performance killer is the NTSC effect, which is deactivate by default, though.

You can also try the crt-yah-single-pass variant, which misses some effects entirely (Halation, NTSC, Deconverge, Phosphor Burn-in, Color Profile, Scanlines Offset, Brightness Flicker, Sharpen).

2 Likes

That’s great, thanks for the reply! I’ve repurposed my old Mac Pro and have a 1060 with 3GB of RAM so it’s not exactly a powerhouse but I’ve not asked for more than 2.5/3x resolution boost of anything PS2-era. I did try turning off Halation, and it did help, for sure. The single-pass variant, does it use the same masks? I really like the look of the slot mask mask.

I haven’t applied anything else, so I don’t think I would have the NTSC effect running, no?

The single pass variant looks exactly the same incl. the mask, only the mentioned effects are missing. It’s in fact the same code base. Even though you can disable all these effects in the multi pass variant as well, there is still some overhead running though all the passes without applying the effects.

Yes, the default preset has the NTSC effect disabled (Profile set to 0).

A new version will be available soon.

It mainly focus on improving the performance of the NTSC and Halation effect, but don’t expect miracles. :wink:

  • Add “NTSC > Chroma Samples” parameter to reduce the number of samples, sacrificing some quality of the effect for higher FPS

    Value can be set between 0.25 an 1.0, with 1.0 (default) representing the original sample count. Each step of 0.25 reduces the sample count by a quarter.

    For Two-Phase the max. sample count is 32, lowering will result in a reduced color “smear”.
    For Three-Phase the max. sample count is 24, lowering will be less noticeable.

  • Add “Halation > Influence” parameter to select between Scalines, Mask and Both

    Previously the halation effect only made the scanlines glow. Now the mask intensity can be lifted as well.

    The following example shows the differences.

    • left: only mask is affected
    • right: only scanlines are affected (previous behavior)
    • middle: both are affected

    grafik

  • Improved performance of the blur passes used for the halation effect, esp. for higher source resolutions

  • Changed “NTSC > Chroma Phase” parameter range to align auto value (0) with other auto parameters

    This is a breaking change and you have to adjust your own presets. 0 is auto, 1 is two-phase, 2 is three-phase

  • Fixed glitch of vertical scanlines, when output resolution is smaller than the screen resolution (e.g. 1080p output on 2160p screen)

5 Likes

Here comes another small update.

It refines how the automatic screen scaling works and adds a new options to select the mask’s sub-pixel order.

  • Added “Mask > Sub-Pixel Order” parameter to switch between RGB and BGR.

    When a MG mask is selected not the order is changed but the colors to BY.

  • Renamed “Screen > Scale” parameter to “Scanlines > Scale” as this is what it mainly does.

    The implicit mask scaling has been removed to make this setting independent from the actual “Mask > Scale” parameter.

  • Changed “Native” option of “Screen > Resolution” parameter to not scale the mask when internal resolution changes dynamically.

    This means the number of scanlines always matches the internal vertical resolution, like before. But the mask size - which is a physical property of the CRT - stays the same and is not scaled anymore.

If you also wanted to support pre 4 Stack Tandem RGB RWBG WOLED displays at the subpixel level, you can use RBG subpixel order.

I now added RBG and its reverse order GBR as well. Not sure if the latter makes sense, but I like to keep things symmetrical.

1 Like

Excellent! This post has some subpixel photos of how it looks or at least is supposed to look:

Do you have any idea of what it would take to support the new 4 Stack Tandem RGB WOLED displays which have a BRWG subpixel Layout?

I have no idea. Is there already another shader that supports this? If so, I could take a look at its implementation and maybe adapt my code accordingly.

1 Like

Not yet, I’m still awaiting test results from users who have the new displays.