DOSBox "vgaonly": Huge jagged edges despite using shaders

Hey guys! When I set DOSBox to machine type “vgaonly” (which is the only way I can prevent Prehistorik 2 from crashing), I get huge jagged edges even though I’m using shaders like xBR, xBRZ or Scalenx:

When I set it to “svga” or “vesa”, the filters smoothen the lines and it really looks great:

What’s prevening the filters from working properly on the “vgaonly” setting? Is there anything I can do?

That usually means it’s getting line-doubled, which breaks the pixel detection algos.

1 Like

Hey hunterk, I googled line-doubling but I’m still not sure I understand. Could you point me to a resource for further reading, and do you know if there’s any setting in DOSBox that I can do to stop this line-doubling?

I think he’s saying when that game renders instead of a line being a pixel it’s two pixels(hence line-doubling), and I don’t think there’s anything to be done about that.

This is an issue with dosbox itself. Also happens when running dosbox stand-alone. Games that use 320x200 are being displayed at 640x400 when using “vgaonly.” Not sure if it’s by design or not.

Crap. Sounds like I’m outta luck with this one, then? The game crashes after level 1 whenever I choose a mode that the shaders work with.

You might want to ask about it here, since it happens with stand-alone dosbox:

https://www.vogons.org/viewforum.php?f=31

The issue in this case would be that when using windowed mode and setting windowresolution = original in the config file, 320x200 games result in a window that’s 640x400 with machine = vgaonly, while it’s 320x200 when choosing svga_s3.

1 Like

Thanks! Much appreciated. :slight_smile:

You can use a shader to scale the image down to 50% and then apply the shader on top of that. It’s a bit of a hassle, but not too bad.

1 Like

Hello everybody! For anybody wondering about this issue in the future, I did some digging after RealNC pointed me in the right direction. The 640x400 resolution in “vgaonly” mode is indeed intended by the makers of DOSBox, as described here:

https://www.vogons.org/viewtopic.php?f=32&t=38388

@hunterk It hadn’t occurred to me to downscale with a shader and then apply a regular shader preset. Do I understand correctly that this would mean creating my own sequence of shaders? I’m not quite sure how to do that; is there a good tutorial? Plus, which shader would I use to downscale?

1 Like

you can use the stock shader. You just need to make a new pass in front of any other passes with these lines:

shader0 = ../stock.glsl
scale_type0 = absolute
scale_x0 = 320
scale_y0 = 200
1 Like

Also make sure the rest of the passes numbers are corrected, the original shader0 will be shader1 and so on.

Some games use 240 lines though. Isn’t there a way to express “half the input size” in a shader preset? That would be neat.

Yes, you can do half size like this:

shader0 = ../stock.glsl
scale_type0 = source
scale0 = 0.5
2 Likes

YES!! Hunterk’s suggestion worked.

I made a copy of xbr-mlv4-multipass.glslp and added the new lines before the other shaders in that preset.

Really awesome! Thanks so much for your help, guys.

3 Likes