Using CRT shader on a real CRT Monitor


I recently bought a 17" Sony CRT PC monitor and I would like to know which would be the best shader to emulate the look of a standard definition Sony BVM/PVM.

I was told that almost all CRT shaders are designed to be used with LCD displays only. I also have read about using the tvout+interlacing.cgp for CRT monitors at 480p - but it seems I could get better results using others CRT shaders with higher resolutions.

Since my monitor can reproduce a resolution up to 1600x1200 (allowing me to use a scale of 5x.), wouldn’t using a specific CRT shader at 1200p be better than using the tvout+interlacing.cgp preset at only 480p?

Any suggestion of a specific CRT shader?


misc/scanline.glsl? Or misc/ in your case

See also [Guide] How to run RetroArch at 240p on your VGA CRT monitor (THICK SCANLINES)


Mask effects usually don’t look very good on CRT monitors, but YMMV. 480p with tvout+interlacing looks extremely close to actual 240p, though neither looks much like a consumer TV. If that’s the effect you’re going for, something like GTU would be a good place to start. Maister’s NTSC shaders should look very good, too.


Sorry for a late reply.

I don’t see it mentioned in the link posted by ensra, but the key to true 240p @120 Hz without (noticeable?) artifacts, full brightness and no flicker is setting video_swap_interval = "2" in retroarch.cfg file (it’s called “Vertical Sync (Vsync) Swap Interval” on GUI).

The other problem I see is the excessive sharpness. Most people recommend blurring horizontally, but I find it unpleasing, I’d rather use reverse-aa shader and make a preset to make it work only horizontally or use just this mod, it’s even faster.

Just my 2 cents. Cheers.


When using [email protected], it seems the vertical frequency is reported as 60hz inside Retroarch. Is this normal? Do I only need to change the vsync swap interval?

Also, what are the disadvantages of using 240p @120hz (with video_swap_interval = “2”) instead of 480p @ 60hz (video_swap_interval = “1”) regarding the smoothness?


It shouldn’t affect the smoothness, but if you encounter something that actually needs the 480 res (that is, interlaced content), it won’t have enough lines to show it properly at real 240p.


Good catch. I believe you have to set

video_refresh_rate = "120.000000".

As hunterk said, you’d have to either use a different setting for mixed-rate content (i.e: Playstation) or sacrifice one rate. There are cases in which this is no biggie, for example some games that only use 480i for title screens (like Megaman Legends 2) can be played entirely in 240p.


Unfortunately using 120hz (even with video_swap_interval = “2”) doesn’t look as smooth as 60hz. It looks like I’m using a LCD screen. Oddly Retroarch, as I already said, when using 120hz, is reporting 60hz (but my monitor reports 120hz).

Black frame insertion is also not working - because it halves the framerate to 30hz (and the screen flickers a lot).

I’m not sure what could be wrong. I’m using CRT Emu Driver to create 240p @ 120hz.

Already tried to use OpenGL, D3D and some others options.

How are you guys creating the [email protected] mode?


Ok, now I get you, I performed a test just now and I could confirm there is a little ghosting on Super Mario Bros (I used Nestopia UE) when using 240p @120Hz with video_swap_interval = "2". Maybe I was thinking about stuttering :thinking:

I could not reproduce the mismatch between the video mode in use and what RetroArch reports, which you describe. What I do see is if you set video_refresh_rate = "120.000000" you get:

INFO] [Video]: Timings deviate too much. Will not adjust. (Display = 120.00 Hz, Game = 60.00 Hz)

I assume it should be set video_refresh_rate = "60.000000", so I guess you’re ok anyway :stuck_out_tongue: .

If black frame insertion is halved, could it be that you forgot to set video_swap_interval = "1" ?.

Anyway, neither black frame insertion nor interlacing shader give ghosting, but interlacing is versatile and definitely brighter.

EDIT: For modeline calculation I’m using gtf or a script I wrote for 224p (gtf gives hsync below the supported range). In that link @hunterk provided this link for that purpose: The XFree86 Modeline Generator.


So, only using video_swap_interval = “2” it isn’t possible to achieve a perfect scrolling (like 60Hz) with 120Hz?

When you said that interlacing shader doesn’t give any ghosting, are you referring of using it with [email protected]?


It seems that you are right. It’s smooth as in fluid movement but it has ghosting, hence not “perfect”.

That’s right, I forgot to clarify. And video_swap_interval = "1", of course.

EDIT: Missed tip.


I see…

Well… Any specific setting at 480p that you like to use with the interlacing shader? Some special configuration that gives a better (and brighter) picture?


You can try raising Interlacing Scanline Bright % as long as you can’t see colors through the black gaps between scanlines (try raising it all the way up to see what I mean). A value around 0.10 can work.

Another tip is tweaking your CRT controls. Make sure Contrast is maxed and raise Brightness the highest you can while black is still flat (i.e: It doesn’t show little darker gaps). This will get you the closest to full brightness (and of course no ghosting) :slightly_smiling_face:.


Bumping this since I recently acquired a CRT monitor. I’ve been experimenting with a number of different shader combinations, and found this one to be most useful:

shader #0: Image-adjustment
shader #0 filter: don't care
shader #0 scale: don't care

shader #1: interlacing
shader #1 filter: don't care
shader #1 scale: 2x

shader #2: pixellate
shader #2 filter: linear
shader #2 scale: don't care

This adds perfect 1:1 scanlines, gamma correction, and corrects any scaling artifacts from non-integer scaling.

The one thing that’s missing IMO is any kind of adjustable blur/sharpness. There are a number of shaders I’ve been playing around with to achieve this:

-sharp-bilinear-scanlines + dotmask 
-sharp-bilinear-2x prescale

The problem is that once you start juggling 3-4 shaders, it becomes difficult to know what order to stack them in and what the scale should be set to for each. Put something in the wrong order or set the scale wrong and it breaks the shader chain. Any suggestions for how I might change my existing shader setup?


tvout-tweaks should probably go first or right after image-adjustment, both at 1x scale (though “don’t care” will give an implicit 1x scale anyway on any pass that’s not the last)


This worked perfectly, thanks!

Shader 0: tvout-tweaks
Shader 0 filter: don’t care
Shader 0 scale: don’t care
Shader 1: image-adjustment 
Shader 1 filter: don’t care
Shader 1 scale: don’t care
Shader 2: interlacing 
Shader 2 filter: don’t care
Shader 2 scale: 2x
Shader 3: sharp-bilinear
Shader 3 filter: linear
Shader 3 scale: don’t care 

I noticed that sharp-bilinear compared to pixelate is slightly faster and the scaling it does is slightly sharper, so I switched to that.


Nice to see someone else doing something like this. I’ve been playing around to see what shaders work great on CRTs too.

You could try using gtu50 instead of tvout-tweaks for a slightly different effect. I noticed tvout-tweaks would darken when blurring, and I didn’t like that. I also kind of liked the blurring effect a little better.


I’ve noticed that a lot of the blurs seem to darken the image quite a bit for some reason. Controlled-sharpness and sharp-bilinear prescale also seem to darken the image.

How does sharp-bilinear prescale work? I think I only notice a difference when it’s set to 1, and it seems to darken the image quite a bit. All the other values look the same to me. That’s with the following setup:

Shader 0: image-adjustment 
Shader 1: interlacing
Shader 1 scale: 2x
Shader 2: sharp-bilinear
Shader 2 filter: linear
Everything else: don’t care


Also, how should I go about combining these?

Sharp bilinear


I’d say either sharp bilinear or reverse-aa is redundant. I’d use: Image Adjustment + Reverse AA + Interlacing.glslp

You can replace reverse-aa with whatever you want.

EDIT: What do you guys think about: Image Adjustment + XBR Horizontal + Interlacing.glslp?