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

For some reason neither the vga or svga presets work for me from scanline_classic. I load the shader and i see the shaders loaded in the list, but all i get is a filtered image with no scanlines in DOSBox Pure.

DOSBox Pure, video options SVGA, svga.slangp and set line_doubler to 0.

1 Like

It is a good option, you get very interesting results, although it is not very faithful to the time.
The monitors of that time were very different from a TV, had its own personality, and the mask was very important. The memories are not reliable, but I have clear that they were much more, dense? I do not know the technical term, but they looked sharper and the color was more solid.

I can’t get good sources on the internet, but some examples I have obtained may serve as a reference.

A good source of CGA is shown in this video from The 8-Bit Guy.

The monitors were tinted.

In this article in Vogon, you can see the Hercules, CGA and VGA mask on an MDA monitor.

One thing I could not get out of my mind was the famous anti-static shields. The last ones were glass, but the first ones were a metal mesh, which I suspect is to blame for 99% of the baby boomer generation’s blindness. This is going to look great in an overlay. :slight_smile:
Captura desde 2023-05-07 17-10-56

Thanks to you, tonight I test, although the machine is not the most optimal (it is old), I can have references if it is well optimized or as it looks, I load heavy shaders in the middle of the frame, that’s how I’m guided.
I think the important thing is that it is light, or if you think, a fast version for low resource systems and a super optimal one. If you need these references, I’m looking for more.

2 Likes

I like this shader, it has a retro monitor style, and the metacrt too, I’m trying them all out, I wonder what the future may hold for 3D shaders?

while super-cool, I don’t expect the metaCRT concept will take over any time soon just because it’s so demanding and fragile. It’s a pretty amazing shader, though :slight_smile:

Thanks, that’s a good, natural image. I have only achieved approximations, with design or illustration work.
I for one found this one, lost in the depths of the forum. Classic CRT Collection - Overlay Pack. There are too many, we need a catalog or something with categories so they don’t get lost.

2 Likes

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.