CRT screen imitation in DOSBox SVN Daum

Discuss just about anything else
Post Reply
User avatar
MrFlibble
Forum Administrator
Posts: 1798
Joined: December 9th, 2010, 7:19 am

CRT screen imitation in DOSBox SVN Daum

Post by MrFlibble »

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:
Image

Image

Another shader creates a less distorted (but still not completely rectangular) image:
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: Select all

[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:
Image
User avatar
DOSGuy
Website Administrator
Posts: 1063
Joined: September 2nd, 2005, 8:28 pm
Contact:

Re: CRT screen imitation in DOSBox SVN Daum

Post by DOSGuy »

My monitors never looked that bad, but it's still impressive.
Today entirely the maniac there is no excuse with the article.
User avatar
MrFlibble
Forum Administrator
Posts: 1798
Joined: December 9th, 2010, 7:19 am

Re: CRT screen imitation in DOSBox SVN Daum

Post by MrFlibble »

The CRT-geom-curved.fx shader turns out to be quite customizable and allows to adjust screen curvature, gamma correction and other stuff, similar to an actual CRT screen. Detailed info can be found here.
User avatar
MrFlibble
Forum Administrator
Posts: 1798
Joined: December 9th, 2010, 7:19 am

Re: CRT screen imitation in DOSBox SVN Daum

Post by MrFlibble »

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.

Here's a comparison of all three shaders in fullscreen mode (1600x900): CRT-geom.curved.fx, CRT.D3D.fx, CRT.D3D.br.fx.
User avatar
MrFlibble
Forum Administrator
Posts: 1798
Joined: December 9th, 2010, 7:19 am

Re: CRT screen imitation in DOSBox SVN Daum

Post by MrFlibble »

Apparently the normal2x scaler produces a better result compared to hardware2x. Here's a comparison of all three CRT imitation shaders:

CRT-geom-curved (hardware2x)
CRT-geom-curved (normal2x)
CRT.D3D (hardware2x)
CRT.D3D (normal2x)
CRT.D3D.br (hardware2x)
CRT.D3D.br (normal2x)
User avatar
MrFlibble
Forum Administrator
Posts: 1798
Joined: December 9th, 2010, 7:19 am

Re: CRT screen imitation in DOSBox SVN Daum

Post by MrFlibble »

There has been a lot of development in this area over the past years. SVN Daum is hopelessly outdated but now vanilla SVN builds of DOSBox have built-in GLSL shader support. You can get either pure vanilla or the Enhanced Community Edition (ECE) builds here:
https://dosboxece.yesterplay.net/

An excellent shader pack is available here:
https://github.com/tyrells/dosbox-svn-shaders

I tested some of those and settled on the one called crt-lottes-fast.subtle+gain.glsl. It's pretty fast and does decent results. Here's a comparison screenshot of Duke Nukem 3D using the built-in sharp shader (simply using normal2x + opengl makes DOSBox output extremely blurry, and openglnb extremely blocky) and crt-lottes-fast.subtle+gain.glsl:
https://imgsli.com/MzU5NTk
User avatar
DOSGuy
Website Administrator
Posts: 1063
Joined: September 2nd, 2005, 8:28 pm
Contact:

Re: CRT screen imitation in DOSBox SVN Daum

Post by DOSGuy »

I'm glad to see that vanilla DOSBox is still progressing, despite the holdup on v0.75.
Today entirely the maniac there is no excuse with the article.
Post Reply