ValveSoftware / Proton

Compatibility tool for Steam Play based on Wine and additional components
Other
24.34k stars 1.06k forks source link

expand scope of integer scaling #3600

Open fallenguru opened 4 years ago

fallenguru commented 4 years ago

Feature Request

I confirm:

Description

If I understand correctly, integer scaling is currently only applied when a game requests a fixed fullscreen resolution (that's low enough to fit into the desktop's at least twice in each direction, of course).

  1. I think it'd also make sense windowed, as in, make the game think it's running at, for example, 800x600 fullscreen, but actually render it at 1600x1200 in a window.

  2. Lot's of games are designed for a particular (low) resolution, but will not switch to that when run on a display with a higher one, but instead "helpfully" scale their fixed-resolution assets to fit, likely as not resulting in a blurry mess. When different aspect ratios come into the picture, all bets are off ...

One part of this, how to make a game think it's running on a particular resolution display, is already solved via WINE's virtual desktop feature. What's missing is functionality to (integer-)scale that virtual desktop to a higher resolution.

Justification

AFAIK, a lot of the current fullscreen hackery is Proton-only, and the feature seems like it would primarily benefit games, so Proton seemed like a good place to start. If it can be upstreamed, all the better!

Risks

Everything to do with fullscreen, (virtual) resolution-switching, and the like has the potential to break stuff in horrendous ways. OTOH, activating integer scaling at all currently requires setting an environment variable, and setting up a virtual desktop requires running winecfg in the prefix, so it shouldn't impact a vanilla Proton setup at all.

aeikum commented 4 years ago

Can you provide a specific example of a game that you think would be improved by this?

fallenguru commented 4 years ago

The reason for the report was eden* (315810, or rather 945720, which is listed as a DLC but is really another copy of the game with a slightly different engine version).

Its assets are 1024x640[?], faux widescreen. In windowed mode, you get that as-is; if you re-size the window, the game uses what's surely the world's worst scaling algorithm across everything, even the text. Blurry as ..., and playing windowed kills my immersion. At least it preserves the aspect ratio. Fullscreen mode doesn't actually change the resolution. If the desktop resolution happens to be 1024x768, great, if it's a higher 4:3 resolution it'll scale to it, if it's another aspect ratio, I've had everything from artefacts to hangs and freezes.

So far, none of this is Linux specific. Fullscreen doesn't work on Linux at all. WINE's virtual desktop fixes that, but of course the virtual desktop runs in a window, defeating the purpose, and the game's built-in scaler is still atrocious.

What I'd like to do is simulate a 1024x768 desktop for the game, integer-scale that to 2048x1536 and centre that on 2160p. Bonus points if it works on 1440p, cutting off 48 px top and bottom.

But really, any pixel art game with a resolution <= 1/4 the native resolution of the panel would benefit from integer scaling, doesn't even have to be very old or retro, considering a 1080p game on a 2160p monitor qualifies. The question is, how many of those use some variant of borderless window fullscreen instead of proper resolution-switching fullscreen (for which integer-scaling already works).

WhoNeedsAUsrName commented 1 year ago

another notable example, are RPGMAKER games, they're intended to integer scale when you use the engine's built-in upscaling, but for one reason or another, it does not upscale properly