bolrog / d2dx

D2DX is a complete solution to make Diablo II run well on modern PCs, with high fps and better resolutions.
GNU General Public License v3.0
421 stars 49 forks source link

Option to launch in true full screen (with actual monitor resolution change) #84

Closed tomasz1986 closed 3 years ago

tomasz1986 commented 3 years ago

Please forgive me if this has been proposed/discussed already, or if it is plain impossible.

Would it be possible to have an option to run the game in true full screen, i.e. so that the actual monitor resolution gets changed when going in and out of the game? The reason is that in true full screen the monitor is responsible for scaling rather than Windows, which results in smoother scaling, especially regarding text.

For the record, the unmodded Diablo 2 runs in true full screen by default, and the Sven's wrapper offers it as an option (i.e. it uses true full screen when desktopresolution is unchecked).

At the moment, it is still possible to work around the problem by actually changing the screen resolution in Windows to 800x600 before launching the game, so this is not a deal breaker, but the workaround is rather clunky, so it would be nice to have this possibility built-in.

bolrog commented 3 years ago

Hm. I'm actually unconvinced that this offers anything over borderless Fullscreen.

D2DX already uses a better scaling filter (sharp bilinear, which is more suited for D2) than any monitor would have implemented. And if a different look is desired, it seems better to add this in software rather than rely on the monitor (which varies for each user).

"True" Fullscreen makes no technical sense on LCD screens, and is basically falling out of favor. Microsoft are also pushing borderless FS strongly since a few years. There should be no difference in latency or frame rate anymore. There are technical issues such as alt-tab being more complicated and slower as well.

I'm not impossible to convince, but I'd like to see evidence that it offers something that isn't possible in borderless fullscreen.

tomasz1986 commented 3 years ago

D2DX already uses a better scaling filter (sharp bilinear, which is more suited for D2) than any monitor would have implemented. And if a different look is desired, it seems better to add this in software rather than rely on the monitor (which varies for each user).

Yeah, but this is how the original D2 works and looks, doesn't it? 😉

It's all about user preference really, but I personally don't like the sharp bilinear filter, even if it is technically better. For what it's worth, monitor scaling seems to apply some kind of anti-aliasing, while Windows scaling makes everything look more pixelated. For this reason, I have always played with the Sven's wrapper in true full screen.

This is how the game looks for me.

Native 800x600 (smooth):

image

800x600 scaled to 1920x1200 in Windows (pixelated):

image

Right now, if I was to play the game with D2DX, I will be forced to switch the resolution to 800x600 before launching the game (as I cannot really stand the pixelated look). The only alternative, other than true full screen, that I could think of would be to have a choice of filters other than sharp bilinear, but that probably is a different issue/enhancement altogether…

bolrog commented 3 years ago

I think it would make more sense to add a straight regular bilinear filtering option then. I'll consider it for an upcoming release!

tomasz1986 commented 3 years ago

Just a side note, but a few years ago I did a tonne of testing trying to find out how to upscale D2 to look decent on YouTube. All the different filters with screenshots are available on https://forum.videohelp.com/threads/389813-YouTube-destroys-game-footage-please-help-with-bad-quality-after-upload#post2525988.

I personally liked how the game looked with sinc filter applied, as it made everything super-sharp (e.g. https://forum.videohelp.com/attachment.php?attachmentid=46359). Of course, I was post-processing the footage, which is not the same as applying filters to the game in real time, but still.

bolrog commented 3 years ago

Thanks, that's an interesting overview. I will start by adding basic bilinear filtering as an option. I think this will bring you very close to the look of other Glide wrappers and e.g. the ddraw mode. My focus isn't exclusively on integer scaling anymore, so this seems like a reasonable thing to have.

tomasz1986 commented 3 years ago

I'm not impossible to convince, but I'd like to see evidence that it offers something that isn't possible in borderless fullscreen.

I just wanted to add one more thing regarding "convincing" 😉, which is somewhat related to my last post. When screen recording (e.g. with OBS Studio), it requires much less CPU power and disk space to record the game at 800x600 resolution in comparison to 1080p or higher. Also, recording the game in its native resolution preserves the original graphics, which are then recorded in their original form and are unaffected by hardware-based monitor scaling and such.

The above is not the case when the game itself is run software-scaled to the desktop resolution from the very beginning.

bolrog commented 3 years ago

While that's a fair point, modern PCs are more than capable of 1080p recording. And I've noticed that YouTube seems to treat low-res content much worse than if it's 1080p.

Btw I've made release 527 which has a new option you can put in d2dx.cfg to choose between default, bilinear and Catmull-Rom scale filters.

tomasz1986 commented 3 years ago

default, bilinear and Catmull-Rom scale filters.

I have tested the new filters. Bilinear is too blurry to be playable, but the Catmull-Rom one looks very similar to my monitor scaling. It still seems to be very slightly blurrier, although it is difficult to compare them directly, as the monitor scaling doesn't affect how the game looks in screenshots. Thank you for such a quick reaction regardless.

While that's a fair point, modern PCs are more than capable of 1080p recording.

I record lossless in 60 fps, which does require a decent CPU, although nothing crazy. File size difference between 800x600 vs 1080p and higher is real though.

bolrog commented 3 years ago

I will close this, and hope that the improved filtering solves most of your issue. I don't have any near time plan to implement resolution switching due to the reasons mentioned. (It's not "real" resolution switching on an LCD, and Windows is moving towards not supporting it well)

tomasz1986 commented 3 years ago

The game plays well with the Catmull-Rom filter, so the original problem has indeed been solved.

I still think that the native resolutions are superior for recording though, simply as the only way to preserve the original graphics. The screen type doesn't matter here either. Fortunately, the workaround to manually switch resolutions in Windows prior to launching the game does the job, so this is not a huge deal.

YouTube does like higher resolutions, but I would still record in native 800x600, and then resize the video afterwards, always keeping the original recording in the process.

Windows is moving towards not supporting it well

I wouldn't necessary say so. While this may be true for newer games, Windows is likely going to support true full screen forever, if only to keep compatibility with thousands of older games and potentially other software, for which this is the only way they can run.