Jump to content
Sign in to follow this  
MrFlibble

CRT screen experience in DOSBox

Recommended Posts

MrFlibble    15

Hopefully this will be interesting to the DOS verison enthusiasts here. I was playing around with pixel shaders that are included in DOSBox SVN Daum, and realized that several of them will alter the image so that it looks like real CRT screen output. One of the shaders goes as far as to imitate the curved surface of an actual CRT display:

23cxUig.png

 

Another shader creates a less noticeable surface distortion:

Lsy4Teo.png

 

To set up DOSBox SVN Daum to use these shaders, you'll need to change the following lines in dosbox.conf:

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

[render]
aspect=true
scaler=hardware2x
CRT-geom-curved.fx creates the "fishbowl" effect pictured in the first screenshot above. CRT.D3D.fx is shown on the second screenshot. CRT.D3D.br.fx is a brighter version of CRT.D3D.fx. Also there's CRT-geom-blend.fx, which is similar to CRT-geom-curved.fx but also adds motion blur.

 

All these will work both in the windowed mode and in fullscreen.

 

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

bnn53jX.jpg

Edited by MrFlibble
  • Upvote 1

Share this post


Link to post
Share on other sites
Nyerguds    73

rofl. That's some hardcore nostalgia there.

 

I really don't think it's very useful to add a filter that literally lowers the quality of the final video output though xD

Share this post


Link to post
Share on other sites
MrFlibble    15

I wouldn't say that it necessarily lowers the quality of the image. I might be biased, but I think the image looks somewhat better that way - at least, compared to the raw low-resolution image that has been stretched on a modern display, exposing all its pixely quality.

 

And I certainly believe that this kind of image altering is better than all those filters which attempt to smooth up low-resolution output to give it the appearance of higher quality graphics (like advinterp2x or supereagle). Some of them are are more or less nice (like hq2x - but it's all YMMV of course), but they all push the image even further away from what it looked like originally on CRT monitors.

Share this post


Link to post
Share on other sites
MrFlibble    15

BTW, it turns out that certain parameters of the CRT-geom-curved.fx shader (which was apparently initially written for a console emulator or other to imitate TV screen output) can be modified by editing the shader file to adjust screen curvature (or even turn it off entirely, even though that would be sort of missing the point), the size of the curved corners, gamma correction, as well as some other things.

 

Here's what it looks like without any screen geometry imitation:

oT5RVXr.png

This is accomplished by commenting out (with the //) the following line in the shader file:

  // Enable screen curvature.
  //#define CURVATURE
And here's the same shader with less pronounced curvature:

IjbhoFl.png

  // aspect ratio
  float2 aspect = { 0.5, 0.5 };
And this is to make the screen curves smaller:
  // size of curved corners
  float cornersize = 0.02;
I found a very detailed description of this shader and its customizable options here:

http://filthypants.blogspot.ru/2012/07/customizing-cgwgs-crt-pixel-shader.html

 

BTW, CRT-geom-curved.fx should also work with Gulikoza's build, although it's apparently neither included with it nor available at the download page (there's only CRT.D3D.fx).

Share this post


Link to post
Share on other sites
Jehal    35

Wow this is great!

DOS, CRT screens and C&C. The essence of my childhood gaming memories right there!

Share this post


Link to post
Share on other sites
Sonic    287

Hurts my eyes just looking at the screenshot you posted. Its almost like looking at a low quality interlaced video or something. But kind of neat from a nostalgia point of view I guess.

Share this post


Link to post
Share on other sites
MrFlibble    15

I've asked the experts at VOGONS and here's their (well, first and foremost, leilei's) suggestions:

  • to get maximum quality, run DOSBox in fullscreen in highest resolution possible,
  • use the normal2x scaler instead of hardware2x,
  • CRT.D3D.br might produce better results.
Here are comparison shots of the three shaders with two different scaling methods (in 1024x768):

CRT-geom-curved.fx (hardware2x)

CRT-geom.curved.fx (normal2x)

CRT.D3D.fx (hardware2x)

CRT.D3D.fx (normal2x)

CRT.D3D.br.fx (hardware2x)

CRT.D3D.br.fx (normal2x)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this  

×