First post, by eierfrucht
The 2004 ARPG classic Sacred Gold is targeted by a number of fan-made HD patches (like PureHD or the acclaimed fan remaster Sacred Reborn) that replace the stock 1024x768 mode with a number of 16:9 modes including 1366x768, 1600x1900, and 1920x1080.
However, running the game at resolutions above 1366x768 has drawbacks originating in the tricky nature of the original engine:
1. The higher the resolution, the smaller the UI.
2. Unless you are playing exactly at 768p, some of the 2D isometric tiles (which the engine actually treats as 3D surfaces directly facing the camera!) that make up the background and statics will randomly start flickering or jittering in crazy ways with no apparent cause or pattern.
3. Both the pristine vanilla engine and its fan-patched variant only apply texture filtering to "true" 3D objects like characters, doors, chests, etc. but provide literally zero filtering for the pseudo-2D tiles, despite them actually being 3D surfaces.
4. Stemming from 3., playing while zoomed out as far as possible results in ungodly amounts of the whole game world shimmering because not only there's no filtering for the world, but also zero support for MIP maps.
Luckily, dgVoodoo 2 v2.82.3 solves all of that in a single swoop:
1. First we have to set the viewport resolution to 1366x768 in the fan patch's configuration file for these two reasons: I. make the UI large enough to be readable II. dgVoodoo won't properly handle 1920x1080 for as long as viewport upscaling is at play, and boy are we gonna need that; anyway we don't want 1920x1080 because of how tiny the UI becomes. Alternatively, we might opt to go for 1600x900, but I'll be using 1366x768 in my below example to better illustrate how awesome dgVoodoo's upscaling and downscaling capabilities are.
2. Let's now move on to dgVoodoo.conf. Let the viewport scaling be handled by the wrapper:
ScalingMode = stretched_ar
3. Force the base 1366x768 to be upscaled to 5464x3072:
Resolution = 4x
4. Turn on a good downscaling filter so that 5464x3072 gets properly downscaled to whatever our real display resolution is:
Resampling = lanczos-3
5. Antialiasing does help a lot:
Antialiasing = 8x
6. And most importantly, let us force 16x Anisotropic filtering upon the whole game world including the pseudo-2D background tiles and statics:
Filtering = 16
KeepFilterIfPointSampled = false
What do we get as a result?
1. That goddamn random world & statics jitter is gone for good and not just in 1366x768, but also in 1600x900 or virtually any custom viewport resolution above 768p. It seems that forcing 16x anisotropic does the trick.
2. The UI is nice, big, and readable.
3. Integer scaling the viewport to 4x its normal size then downscaling it to the real display resolution with Lanczos does away with any trace of shimmering when scrolling the world while zoomed out. Forcing anisotropic filtering mostly handles that, too, but the upscale/downscale trick makes everything look significantly clearer and smoother.
Here are a bunch of screenies pitting a pixel-perfect, native 1920x1080 DX7 output without dgVoodoo against a 1366x768 output upscaled to 1920x1080 with the above listed dgVoodoo tricks:
https://i.postimg.cc/Vfm4Dhy0/dg-Voodoo-3.jpg
https://i.postimg.cc/vbVq8fvB/dg-Voodoo-1.jpg
https://i.postimg.cc/XVQx18n2/dg-Voodoo-2.jpg
Of course a static picture won't tell you how much easier on the eyes world scrolling becomes with dgVoodoo, nor will it give you any idea of how bad the random tile jitter is without dgVoodoo, let alone the overall shimmering while zoomed out and moving...
What's your problem then, you may ask. Here's the deal, there's one bug that dgVoodoo sort of exacerbates.
Without dgVoodoo, a small bunch of tiles throughout the world get these ugly seams at resolutions above 768p: https://i.postimg.cc/h4kfSH12/seam.jpg
With dgVoodoo, the moment you set Filtering = 16 (or any other value besides app-driven, for that matter) the seams become much less noticeable, but they start popping up even at 768p in crazy numbers all across the game world: https://i.postimg.cc/1XwwK6QF/seam2.jpg
Forcing a custom filtering mode in dgVoodoo is vital to resolving the worst issues with the game engine (including the utter lack of filtering that has always been endemic to this game). Just switching it off brings back a lot of problems. Switching it on trades all those problems for one new, much less annoying, problem that still prevents the game from looking nice.
Is there anything that can be done to resolve this on dgVoodoo's end? The game's fan community has been trying to do away with the random tile jitter since like the early 2010s by hacking the executable, but all attempts proved futile. The only existing cure seems to be dgVoodoo but that comes with its own side effect 🙁