Old monitor style shader (and overlay?) (for DOSBox PURE)

Can you take a screenshot?

Unfortunately, DOSBox has its own scaling which can interfere with the shader’s output. This may be what’s causing the issue. If you post a screenshot and your DOSBox settings I can take a look at what’s going on. What’s your screen resolution?

Monitor

1920x1080

Core

DOSBox Pure: VGA

RetroArch

Integer Scale ON

Integer Scale Overscale ON

Aspect Ratio 4:3

vga.slangp

Focus 100%

Viewport zoom 1.1

1.1 200%

Viewport zoom 0.90

0.90 200%

1 Like

That shader is good, but it is more of a sample, it is not optimized, the 3d models have many polygons and the sphere consumes, it has two diffused illumination focuses plus environment illumination, if it is optimized possibly it will reach an 80% of speed.

If I give you the 3d model, you do that? We can start with a totally flat model, low poly to test.

no, it doesn’t use an actual model. each “model” has to be built via a weird mathematical technique called “raymarching”. I don’t know much about it aside from the concept.

Thanks for the feedback. For now, try keeping zoom to 1.0 and using UNDERSCAN instead. Let me know if that looks better.

Same result, uneven scanlines.

If I can, the machine is a dual core with a gforce and hd 1080p monitor, but I don’t expect it to run on this machine, although, it feels much slower than the others, it loads at 5fps, I can take others as a reference, for example the yoyo bezzel shaders loads at 25f, the metacrt at 15f. I made some screenshots, these first ones are with Hercules as a base.
PURE is configured by default, the only thing I have changed is the graphic adapter and I have set the radio aspect ratio to 4:3.

I made some screenshots, these first ones are with Hercules as a base. Without shader - Matrix - VGA.

In this screenshot it is compared with Basic, Basic crops the image.

I feel the ghosting effect is too pronounced, or maybe it’s my video that doesn’t support it.
ghost

These are with VGA as the base, Native, VGA and VGA with line_doubler to 0.


The same with Monkey Island.

In this screenshot you can see how the shader basic cuts the image.

1 Like

In the 3d world, anything that starts with “ray”, is a renderer. I’ve read something, it’s procedural, I’m going to find out and if I find something positive, I’ll let you know.

I’ll share with you some curiosities I discovered while testing these shaders… The guest fat shader, when mask 2 is placed, takes color.

hyllian 3d, with internal res x in 2, eliminates screening.

1 Like

He’s using the Tandy-CM11 and the Commodore 1084 as CGA monitors. They’re both using slot mask like TVs but finer pitch.Yes they will destroy any TV in terms of sharpness (at that size anyway). 1080p isn’t really making for good emulation of slots in terms of accuracy. And you need brightness. Lots of brightness. :smiley: Sharpness shouldn’t really be a problem though. Here’s quick shot of GDV-Mini with a few adjustments using mask 8.

Here’s a shot from my 14" TV. In real life it’s looking a bit sharper, but nowhere near as much as you can get it with shaders. TV as CRT has of course other qualities.

Those screenshots are excellent. I hope I can make a new version that will play more nicely with DOSBox.

I went down a rabbit hole and found out that many emulators don’t display the various VGA modes properly. In short, they don’t output in such a way to take advantage of all the flexibility in presentation shaders can offer. That said, with just a few tweaks I’m sure it will be possible to get better results, but it will take me quite some time to learn these codebases and get changes accepted.

Now, something interesting regarding monitor development. Different CRTs have different levels of screen contrast. For TVs, this didn’t matter so much because they would be viewed in a dim environment. But at the office the lights are bright, and the greyish backdrop becomes more pronounced. Later monitors had a much darker screen. I believe they did this by coating it with graphite. Sony was the leader on this of course, with one of the Trinitrons being the first CRT with a black screen, as opposed to dark gray.

So, I’ve thought about maybe adding a background color option to simulate a poor contrast environment. It’s necessary because the background of an LCD is just too black (assuming you have an LCD with a friendly backlight). But I recommend using monitor controls first to get the right level of contrast and gamma on the brighter ends. Lower brightness and a lower gamma setting will lead to a more washed out image. Changing the ambient lighting in the room also has a significant effect on how we perceive the contrast of the image. Adjusting things this way is much more effective than trying to do it with shaders, even with HDR, but with SDR it is a fool’s errand. We simply don’t have enough dynamic range to get realistic results.

1 Like

Here are a couple screenshots I used with the XGA preset in DOSBox Pure without any settings changes, except for Aspect Ratio Correction to ON. This is what you should see when using the XGA preset with typical DOS programs. If you use VGA, the scanlines will be much weaker. This is normal and expected, as XGA monitors have narrower beams than VGA monitors.

@lfan, the issue you see is because you are using integer scale and ovescale. Turn those off.

@alexb3d, I suspect the issue you have with Basic is because that preset is for NTSC use, not computer use, and so the image is far too zoomed in then it should be. Try the preset I made below which turns the zoom off. It also aligns the other settings perfectly with the XGA preset.

shaders = "1"

shader0 = "src/scanline-basic.slang"
filter_linear0 = "false"
scale_type0 = "viewport"
scale0 = "1.0"

TRANSFER_FUNCTION = "1.0"
COLOR_MODE = "3.0"
LUMINANCE_WEIGHT_R = "0.2126"
LUMINANCE_WEIGHT_G = "0.7152"
LUMINANCE_WEIGHT_B = "0.0722"
CHROMA_A_X = "0.64"
CHROMA_A_Y = "0.33"
CHROMA_B_X = "0.30"
CHROMA_B_Y = "0.60"
CHROMA_C_X = "0.15"
CHROMA_C_Y = "0.06"
CHROMA_A_WEIGHT = "0.2126"
CHROMA_B_WEIGHT = "0.7152"
CHROMA_C_WEIGHT = "0.0722"
SCALE_W = "1.0"
SCAN_TYPE = "1.0"
MAX_SCAN_RATE = "768.0"
LINE_DOUBLER = "1.0"
INTER_OFF = "0.0"
FOCUS = "0.12"
ZOOM = "1.0"
COLOR_SPACE = "1.0"

To change this preset to match the VGA preset, simply change the MAX_SCAN_RATE to 480, and optionally change SCAN_TYPE to 2.0. As you increase MAX_SCAN_RATE, you will get a stronger scanline effect.

2 Likes

Yes, the early Trinitron’s were very black and the aperture grill scanline is robust, but that’s a far cry from the shadown mask you got on the IBM PC. If I’m not mistaken, the first monitor to use aperture was a macintosh and people used to swap it for shadow mask because it had a stinky line 3/4 of the way down the screen.

This sounds a bit complicated, because it is different from RetroArch’s philosophy and also, that I have the monitors calibrated by hardware and I don’t want to alter that configuration. :roll_eyes:

The shader basic with the xga and vga settings really looks great, it’s very pleasing to the eye. I like the smooth lettering and the ghosting effect on the monitor. I will use this more when I get a more powerful computer.

If you have a good monitor/tv, changing the brightness won’t affect the calibration much. I calibrate everything to 100 nits with a 2.4 gamma. With scanlines I bump the brightness. When I emulate the Game Boy I actually dim the backlight and it works well.

I will concede that it can be a bit annoying to have to change the settings all the time.

FYI, I added a bunch of monochrome presets to my shader repo. Let me know what you think of them. Just know that they’ll darken the image because the shader automatically scales the brightness to avoid clipping. You can disable this by setting SCALE_W (Scale whitepoint) to 0, but the colors might not be as accurate.

I mean screen calibration with a colorimeter, I work with printers.

Yes, I’ll try them and let you know, I’m really interested in the advanced shaders, but I think I’ll enjoy them more with a powerful pc and a 4k hdr monitor.

I was testing and you can do good things, the guest fast with some tweaks can be a good alternative for fast vga and playing a little with the Koko commodore bezel too. In my spare time I play with shaders more than with games :roll_eyes: You can get interesting things but there are no shaders oriented to emulate those specific monitors.

By the way, I doubt very much that a Commodore fan would have Genesis and Snes posters, maybe Back to the Future and Pamela Anderson.

1 Like

For photo-editing enthusiasts, on the 3d model pages, you can get good resolution raw images to use as a base, even the 3d preview can serve. Also from TV of all kinds. Or if you prefer 3D editing, many of these models are available for free.

2 Likes

Intended.
That allows you to shamelessly make 1084s a monochrome monitor! :wink:

1 Like

Shameless and pleasant. :laughing:
Very good shaders, aesthetic and fast. :v:t2:

I am not very skilled at setting the parameters, I can do something similar, but if I make the overlays (Hercules, CGA [PCjr - Tandy], EGA, VGA and SVGA) can you help me to make the present ones to have them preconfigured in your package?

It would be 2 shaders with 3 or 4 overlays.

Sure!

Since I was an Amiga only addicted fanboy, I don’t remember exactly how those videocard/monitor looked, but I would certainly assist you the best as i can.

.

1 Like

Great! Thank you! I’ll comment on your article later, I have some references.

1 Like