Please show off what crt shaders can do!

@PhilsComputerLab

You don’t need openglpp with this shader. It takes care of correct scanline display. For example, here’s the letter “C” from Monkey Island when selecting the “Close” verb. Without the shader:

raw

The horizontal line at the top is thinner than the bottom one without the shader and with openglnb when scaling to 1080p. To fix this, you indeed need openglpp.

But, watch what happens when using the shader, even though we still use openglnb:

shader

Scaling is now perfect. Both horizontal lines are the same height (two scanlines.)

This is also true for horizontal scaling, not just vertical. You can use aspect = true when using this shader to get proper non-square pixel aspect ratio (like a CRT) without introducing scaling artifacts.

This behavior can differ between different shaders though. Some shaders might indeed require integer scaling to look good. Hyllian does not require this, from what I can tell.

And, as a general note, the higher the resolution of your display, the better job the shader can do at scaling the image more closely to how a CRT monitor would “scale” it. A 1440p display has some inherent benefits for double-scanned VGA resolutions (400p/480p) because it provides 3 output lines for each input line (400 * 3 = 1200 lines, 480 * 3 = 1440 lines). A 1080p display doesn’t have enough lines. It can still look OK, as these two screenshots of the “C” I posted show, but generally, 1440p is beneficial here.

Edit:
Never use output = opengl with CRT shaders. It will blur the image due to bilinear filtering. The shader has its own filters that are sharper and smarter than bilinear.

1 Like

Thanks for the information. Here are 3 screenshots at 1080p and they are a nice improvement over the standard sharp pixel look. I will test on my other machine, that one has a 1440p monitor and later this year I want to upgrade my TV to 4K then I can test some more :slight_smile:

crt-hyllian-updated is the first image, crt-easymode the second and stock is last one.

1 Like

Nice. Have fun :+1:

The gamma is also better with the CRT shader as it tries to match the CRT gamma curve better. A raw image that was designed on a CRT always looks a bit washed out on LCDs due to different gamma. The CRT shader produces better shadows.

The brightness loss due to the shader’s CRT mask is usually corrected by raising the brightness of your display. You could try and raise brightness in the shader itself, but then you run into color clipping issues (you can’t have a white for example that’s whiter than 100% white.) So to preserve the dynamic range of the image, raise the brightness of your display.

2 Likes

Hi, long time no see.

Small update on crt-hyllian-sinc profiles. The default profile is more pixel art friendly now. Besides, it’s a bit brighter.

Release: crt-hyllian - 22-06-06 - slang

Old crt-hyllian-sinc-glow default profile:

New crt-hyllian-sinc-glow default profile:

17 Likes

Btw, no need to use the normal2x scaler with vgaonly. It doesn’t do anything. vgaonly naturally double-scans output. Unlike svga machine types. Only those need 2x scaling.

1 Like

On my setup scaler=normal2x is definitely needed, in fact it toggles between 200p and 400p scan doubled. I am using DOSBox staging and Intel graphics, so there could be slight differences between setups :slight_smile:

1 Like

I suspect you have some override somewhere in a conf file that sets an svga mode. I just tested dosbox-staging 0.78.1 and it definitely doesn’t require a scaler for vgaonly. The whole point of vgaonly is to do more accurate VGA emulation, including double-scan stuff.

1 Like

Updated presets. Spent a lot of time trying to get sharpness and brightness juuuuust right with the NTSC shader, and although these things are never “done,” I feel this is good enough for a release.

edit: forgot to set mask clipping to 0.00, fixed. Screenshot doesn’t reflect this.

RGB

NTSC

NTSC

8 Likes

Another update: crt-hyllian-22-06-07 - slang.zip

crt-hyllian-sinc-glow-fake-pvm preset:

crt-hyllian-sinc-glow-fake-pvm-4k preset:

15 Likes

For the folks who like their Slot Masks with Scanlines, here’s CyberLab Slot Mask II.

You have to load full resolution, then open in new tab or window, zoom in or view fullscreen in order for these to look correct because of the mask and scanline settings.

8 Likes

Guys I feel kind of silly to ask this but how do I load a preset like the one Nesguy shared? I think I am supposed to copy and paste them to a text file and then save them with a .slangp ending, correct? Then where should I place them and do I need to worry about the paths of the shaders they point? Thanks all for your contributions!

4 Likes

I always look where’s the first folder of the first shader in the chain, like this (using rgb example from Nesgui):

rgb

So I should save as *.slangp and save “besides” the shaders_slang folder. Like this:

rgb2

8 Likes

@Hyllian Wow that worked like a charm! Also I’d like to thank @Nesguy, this is some meticulous work here, you’ve balanced very well blending the dithering but also keeping the overall image sharp and let’s not forget @guest.r which without his work we wouldn’t be able to produce these results!

6 Likes

Some more gifs: https://postimg.cc/gallery/zrJc1J5

Video https://youtu.be/GrBam_Hhz0w

Download the Reshade shaders and presets: https://www118.zippyshare.com/v/irU0Fl8e/file.html

5 Likes

Looks like something was a bit off with colors and uneven scanlines. Fixed that now:

Release: crt-hyllian-22-06-08 - slang.zip

crt-hyllian-glow-sinc-fake-pvm preset:

10 Likes

Hey @hunterk what do you think about adding the bw trinitron masks to the subpixel_masks header?

I love how they look and don’t tint the colors on RGB LCD regular monitors.

   else if(phosphor_layout == 22){
      // aperture_1_3_rgb; good for 1080p and lower 
      vec3 ap4[3] = vec3[](black, white, white);
      
      z = int(floor(mod(coord.x, 3.0)));
      
      weights = ap4[z];
      return weights;
   }

   else if(phosphor_layout == 23){
      // aperture_1_4_rgb; good for 4k 
      vec3 ap4[4] = vec3[](black, black, white, white);
      
      z = int(floor(mod(coord.x, 4.0)));
      
      weights = ap4[z];
      return weights;
   }

mask 22 on 1080p screen:

8 Likes

hello, can you share it again please? thanks!!

1 Like

If you’re talking about the presets above, it depends on @hunterk adding those masks to subpixel_masks.h. Otherwise I’ll have to insert those masks inside my shaders and it’ll take some time…

1 Like

Yeah, sure, we can add those.

Can anyone describe the pixel layout for them? like, is it just black, white? Or white, white, white, black, etc?

2 Likes

Don’t no if I understood your question, but the code for the masks are these:

else if(phosphor_layout == 22){
      // aperture_1_3_rgb; good for 1080p and lower 
      vec3 ap4[3] = vec3[](black, white, white);
      
      z = int(floor(mod(coord.x, 3.0)));
      
      weights = ap4[z];
      return weights;
   }

   else if(phosphor_layout == 23){
      // aperture_1_4_rgb; good for 4k 
      vec3 ap4[4] = vec3[](black, black, white, white);
      
      z = int(floor(mod(coord.x, 4.0)));
      
      weights = ap4[z];
      return weights;
   }
1 Like