CRT-Yah! A new shader chain

This is why I’d love if you and Painless put on a panel at a convention. Because I am so in the dark about this and I think we, people, need to see some real world demonstrations.

How does this make an aperture grille mask look better than the default settings of CRT Hylian or something? Is horrible and mangled a huge exaggeration? It sucks not having a base of understanding to work with.

As a cinephile I can’t ever abide using an LCD. As a retro gamer, I’m really happy with shaders that make my games look close enough to how they did on my KV-32FV310 (correct me if I’m wrong but 600 TVL seems close to this and 800+ for an XBR960). Like if I need the actual TV next to me to be able to tell the difference…well…

2 Likes

Thanks, it’s an honour.

To be so pedantic about Plasma and OLED and considing yourself a cinephile while bathing in ignorant bliss about the subpixel and phosphor level stuff is quite an interesting irony.

The history is all right here in these forums. Just go back through some of my posts and you’ll see that I was just like you at a certain point, then I eventually started noticing things and the more I saw, I couldn’t unsee.

Everything that could potentially go bad about OLED subpixel CRT rendering and everything that has been resolved can be viewed right in those links I shared above. Just read a little beyond the links and you’ll see what it took and what I did to get proper WOLED support in Sony Megatron Colour Video Monitor after discovering it was working purely by accident in CRT-Guest-Advanced.

In general though all you need to do is go close to the screen with a low enough TVL preset and you’ll see that with the wrong subpixel support the phosphors and subpixels look nothing like they do on a CRT.

You also have the opportunity to see this firsthand by participating in my little test. I have nothing to gain right now by doing this because I don’t own a new tandem OLED panel display with RGWB subpixel layout so I’m only spending time and energy on this for the wider community, yourself included.

It slightly irks me that others are not as enthusiastic and determined enough to make this a priority since it’s been over a year and still I can’t get 3 close up photos of a tandem WOLED screen showing 4K 300TVL RRGGBBX, RRBBGGX, BBGGRRX subpixel layouts in action and test new layouts if possible. Back in the day when I was wrecking my own OLED display, I was on it and wouldn’t relent until I got the results I wanted.

Now people are saying that OLED TVs are the best for gaming and the best for CRT emulation, however, they’re not saying this for the reasons I’m speaking about here though. More so for the motion clarity potential, pixel response times, black levels, viewing angles and other CRT like qualities. Very few people in the mainstream, the wider community or the RetroTinkers and FPGAers seem to care about or focus on accurate subpixel CRT emulation.

So many are it seems. There are many points of reference and demonstrations available online which I have pointed to in numerous posts over the years. A good place to start is the first post of the Sony Megatron Colour Video Monitor thread.

A few years ago, it was thought that subpixel level CRT emulation was impossible on OLED displays. Look at where we are now.

2 Likes

This is how we learn. It’s not bathing in ignorance, and I do all this reading but the results truly feel impossible to see through online research. Through videos. Through images.

I would happily drive a few hours somewhere to seek in person counsel. To see and hear someone explain. I’ve lived in ignorance plenty of times and I wish I understood far earlier about a great many things. I suspect this instance is a similar instance.

I’ll do what I can, not just because of this gnawing drive for fidelity, or artistic intent, but I’ve been in your shoes so many times. And I so often identify with your pursuit, your frustration, and even the analytical level of thought you put into your posts trying to communicate it all.

Lets hope MicroLED or QDEL or whatever gives us better than OLED and MiniLED currently do.

1 Like

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).

3 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)

6 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.

1 Like

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.

Here is a new version with some tweaks and fixes that have been accumulated over the past two months.

  • Allows twice the halation intensity (higher values mainly affect highlights)
  • Allows twice the halation diffusion (value range is now also more linear)
  • Exposes the internal halation weight parameter (higher weights favor highlights)
  • Reworks the color overflow to reduce its yellow tint (also renamed parameter from “Overflow” to “Glow”)
  • Glow effect is now applied after the halation effect
  • Fixes the internal uniform frame factor, to stop flickering when frame time delta is below 8 milliseconds (e.g. N64 cores)
  • Reorganize parameters
2 Likes

Really enjoying crt-yah Jezze. For your recept update, can we just update the shaders through retroarch?

Glad you’re enjoying it!

Yes, the PR is closed and the shader package for RetroArch should have been updated.

2 Likes

Been away for a while, busy with life. So glad to see you are still working on it :smiley:

Will try the new version very soon, hopefully today!

Welcome back!

There were many small changes, additions and optimizations since your last post, but nothing groundbreaking. I’m still eager to read your feedback. :slight_smile:

You also will find a preset in “crt/shaders/crt-yah/presets” which was created based on your settings, called “pure-scanlines”.