Gizmo crt shader

I wrote an own crt shader because most crt look to dark or scanlines look overemphazied.

My shader has the following features:

  • allows fractional scaling.
  • produces sharp “looking” pixels.
  • uses actual RGB LCD pixel-pattern of output device for horizontal subpixel scaling. There is also an option for BGR pixel-patterns. This feature does only work if shader output goes directly to the screen.
  • uses texture anti-aliasing shader for vertical scaling.
  • adds color intensity dependent scanline pattern.
  • adds noise to mimic restless CRT/PLASMA pixels.
  • has horizontal blur option to mimic bad composite quality, which mixes dithering patterns to a solid color (megadrive, n64).
  • has vertical blur option to mimic n64 vertical software blur.
  • has a curvator option.

Sources:

Examples:

13 Likes

I updated to v0.2. v0.2 removes vertical steps if curvator is used.

N64 games with nativres=1 and 320x240 output resolution look quiet good. Here is a comparison of gizmo-crt-n64, bilinear and nearest neighbor.

2 Likes

Here are some screenshots with latest changes. https://github.com/gizmo98/gizmo-crt-shader/tree/main/screenshots

1 Like

Scanlines visibility depend on where you play. Usually PAL users don’t recall seeing them because the screen is more lines at y (256-288 on small 13" Amiga-ST monitors) while NTSC users with 240 lines or NES with 224, on large screens 20" or more, see them much more prominent. In any way scanlines were there.

1 Like

@DariusG I just use scanlines to get vertical pixel separation to get the impression of separate pixels. SOTN needs pronounced scanlines and blur to get the so called „CRT magic“ look.

image

I have pushed v0.3 which uses only one *.glsl file and adds parameters for scanline intensity, blur, screen distortion and lcd output pattern.

I use blur setting 0.65 now for megadrive shader.

4 Likes

I have added a slang port with presets. The following parameters are possible:

2 Likes

I have fixed my remaining aspect ratio issue. Slang shader is updated and pushed to v0.4. Any input would be welcome so i can open a PR to get it included in libretro slang shaders.

I also tested on a 65“ 4k screen. I hadn’t much expectations but Donkey Kong, mana dragon, F-Zero vehicles and Mario Kart karts look really plastic set off from the background.:flushed:

1 Like

Silent Hill with Scanline Intensity 0.35 and Blur Intensity 0.65. No dithering visible.

Slang shader is now part of libretro/slang-shaders.

Main preset can be found under /crt. System specific presets can be found under /presets/gizmo-crt.

5 Likes

Just another example why pure bilinear filtering is not the right thing. Megadrive uses horizontal blur for effects and N64 uses it to smooth edges. PSX seems to benefit as well as you can see here. The legs of lara are horizontal smoothed. Blur also mixes dithering away.

I also found out you need at least 2m distance from a 65" screen to get the right impression. If you stand right in front of it it looks like pixel madness.

1 Like

Glsl shader is now part of libretro/glsl-shaders.

3 Likes

Does composite signal or NTSC produce colour bleeding? Sonic looks a bit more vivid with colour bleeding applied, but i don’t know f it is a real effect.

1 Like

If this is a real crt picture colour bleeding should be added: https://http2.mlstatic.com/D_NQ_NP_2X_141311-MLB20502741776_112015-F.webp

1 Like

The picture doesn’t seem to be a particularly high quality picture. Are you sure you want to base your decisions based on that?

1 Like

@Cyber I have added a colour bleeding parameter in an unreleased shader version. You can bleed 0.0-3.0 horizontal neighboring pixels in 0.1 steps. At least megadrive/genesis looks a little bit more vibrant with it. You can also disable it completely with 0.0.

So a really bad looking small crt can be replicated. But most kids played on small bad looking crts at the time.

But i will search some other pictures of sonic3 title screen for comparison.

2 Likes

I‘m really not sure. This one doesn’t show bleeding : https://www.reddit.com/r/SEGAGENESIS/comments/icdg4g/it_literally_doesnt_get_any_better_than_playing/?utm_source=share&utm_medium=ios_app&utm_name=ioscss&utm_content=2&utm_term=1

I would not rely on photographs to judge how a CRT looked. Photographs capture a lot of things the human eye doesn’t notice, and also introduce aberrations that weren’t there. Without careful selection of settings, the colors will shift as well.

TVs have a color setting that you are supposed to set with a color bars test pattern and blue filter glasses. It can be set without the filter as well, it’s just not as reliable. You would set the color setting so that there wouldn’t be any color bleeding. The most likely color to bleed was red.

3 Likes

I just added it now as a option. It is disabled by default.

I have not done mask emulation stuff. If i look at these images scanline separation is much more visible and color intensity dependent scanline width mimics it quiet well. https://www.reddit.com/r/crtgaming/comments/138j8v8/bvm2010p_after_recap/?utm_source=share&utm_medium=ios_app&utm_name=ioscss&utm_content=2&utm_term=1

1 Like

Those BVMs are basically PC monitors that accept 15 khz signals (as well as 31 khz), so their masks are extremely tightly-pitched. Consumer TVs, OTOH, have a much coarser mask with larger individual phosphors, so the masks tend to be more noticeable. Also, depending on the display size and other factors, the scanline separation may be barely noticeable at all, which makes the mask texture the more noticeable characteristic for better or for worse.

3 Likes