derclou icon indicating copy to clipboard operation
derclou copied to clipboard

Implement integrer scaling with anti-aliasing

Open myself600 opened this issue 3 years ago • 1 comments

By default, the game is up-scaled with "linear" filter, which looks blurry. Changing it to "nearest" is causing the pixels to have variable non-square width/height. To solve this, the game should apply up-scaling in two steps:

  1. Upscale with whole numbers using "nearest" (320x200 --> 1920x1200), then
  2. Downscale to target size with anti-aliasing, i.e. "linear" (1728x1080)

So this is how it would look like at the end:

zlodej-scaling

I've discussed this on SDL forums with a proposed solution mentioned, but it's more complex than I anticipated.

myself600 avatar Oct 18 '22 18:10 myself600

I can confirm this issue in my WebPort of the game https://theclou.netlify.app/

edit: I introduced the fix proposed by @myself600 in my fork.

midzer avatar Oct 18 '22 18:10 midzer