I was playing around with pixel shaders that are included with DOSBox SVN Daum when I realized that several of them alter the DOSBox output to make it look like an image on an authentic CRT screen. One of them even goes as far as to recreate the "fishbowl" distortion of an actual monitor:

Another shader creates a less distorted (but still not completely rectangular) image:

In my opinion, this looks pretty awesome (especially the fishbowl effect one). To configure DOSBox SVN Daum to use this shader, you need to make the following changes in dosbox.conf:

Code:

[sdl]
output=direct3d
pixelshader=CRT-geom-curved.fx

[render]
aspect=true
scaler=hardware2x

The CRT-geom-curved.fx shader will create the fishbowl effect. You can use are CRT.D3D.fx instead to get a less prominent surface distortion, and CRT.D3D.br.fx for a brighter version of CRT.D3D.fx.

This works both in the windowed and fullscreen modes.

You can also get higher resolution images by using hardware3x, hardware4x and hardware5x instead of hardware2x:

Last edited by MrFlibble on Mon Apr 07, 2014 9:16 am; edited 1 time in total

It's nice to see DosBox getting more and more of the advanced features that emulators of "simpler" systems have achieved.

Apparently lots of things can be accomplished with shaders (for comparison, the built-in DOSBox scalers that add scanlines look much worse than the shader CRT imitation). There's another one that can turn VGA output into EGA for example.

I Googled information on the first shader (CRT-Geom), and it turns out that it can be customized to adjust screen curvature, gamma correction etc. by editing the shader file. Apparently this is initially a shader that was written for console emulators (and thus it supposedly imitates a CRT TV screen), and then ported to work with DOSBox.

A very detailed description of how to customize the console emulator version can be found here. It is possible to reduce the curvature of the screen, or disable it entirely if desired.

Without curvature emulation, screen output looks like this:
This is enabled by commenting out (with //) the following line in CRT-geom-curved.fx:

Code:

// Enable screen curvature.
//#define CURVATURE

And here's what the screen looks like with the shader set to imitate a less curved screen, with smaller rounded corners:
To get this, just change the lines:

I've asked the experts at VOGONS and it turns out that I made the mistake of taking screenshots in windowed mode, which does not do justice to the shaders' actual capabilities. leilei also suggested to use CRT.D3D.br.fx as the preferred shader.

One point however, whilst it's true that all older CRTs had a fishbowl effect, some more than others, the latter CRTs (and not the cheapest of them meheh) had an almost flat screen, and the latest ones ( again not the cheapest ones ...) had even a perfect flat tube surface.
Same goes for TV sets. I remember the trinitron tubes, some could (*almost*) compete with PC LCD monitors, certainly the latter 27" tubes. (and weighted a 100 kgs lmao)
Just to say that talking about CRTs and fishbowl effect isn't always 100% correct .....

I used to have a 17" almost-flat CRT monitor in the late 90s/early 2000s. The thing was huge. Also when it got worn a bit it would sometimes get noticeable framerate drops after screen resolution changes (e.g. when you quit a game that runs in a lower resolution back to the desktop).

While not 100% accurate, these shaders are certainly a nice retro gimmick anyway

BTW, it is my understanding that normal2x provides a more accurate result for VGA (leilei says EGA and CGA should use hardware2x anyway) because VGA doubles the number of lines: