Yet another integer scaling question

Discussion about displays and related hardware including MiSTer filters and video settings.
User avatar
Alkadian
Top Contributor
Posts: 721
Joined: Thu May 28, 2020 9:55 am
Has thanked: 289 times
Been thanked: 116 times

Yet another integer scaling question

Unread post by Alkadian »

Hi,
I have got a 21" 1600x1200 LCD screen connected via an HDMI cable to the MiSTer FPGA setup. When selecting the option number 1 'use integer scale only' in the .ini file, the image on the screen is a bit smaller. As I am not planning to use any video filters, would you please let me know if using the integer scaling option will produce a general improvement to the playing experience from an aspect ratio point of view? Sorry I am asking that as I am a bit confused.

Many thanks!
deepthaw
Posts: 55
Joined: Wed May 27, 2020 3:45 am
Has thanked: 1 time
Been thanked: 10 times

Re: Yet another integer scaling question

Unread post by deepthaw »

Depends on the core and even then, the game.

Integer scaling is fantastic to prevent shimmering on vertical scrolling in all games. Games with non square pixels however will either look squished (wrong aspect ratio) or scaling artifacts if stretched horizontally.

If you stick with correct aspect ratio, I’d recommend at least enabling the interpolation filter to smooth out the horizontal artifacting. 1600x1200 is nice and high res and games will still look great even with minor filtering.
deepthaw
Posts: 55
Joined: Wed May 27, 2020 3:45 am
Has thanked: 1 time
Been thanked: 10 times

Re: Yet another integer scaling question

Unread post by deepthaw »

deepthaw wrote: Wed Nov 04, 2020 12:39 pm Depends on the core and even then, the game.

Integer scaling is fantastic to prevent shimmering on vertical scrolling in all games. Games with non square pixels however will either look squished (wrong aspect ratio) or scaling artifacts if stretched horizontally.

If you stick with correct aspect ratio, I’d recommend at least enabling the interpolation filter to smooth out the horizontal artifacting. 1600x1200 is nice and high res and games will still look great even with minor filtering.
And to specify, non square pixel games are (mostly) things that run at 256x240 like TG16, NES, SNES and some Genesis games. CPS1 is very non square as well at 384x240.
User avatar
Alkadian
Top Contributor
Posts: 721
Joined: Thu May 28, 2020 9:55 am
Has thanked: 289 times
Been thanked: 116 times

Re: Yet another integer scaling question

Unread post by Alkadian »

@deepthaw,
Many thanks for your feedback! So if I understood correctly I can select the option 'scale to fit the screen height' without integer scaling and then enable the interpolation filter only?

Thanks!
deepthaw
Posts: 55
Joined: Wed May 27, 2020 3:45 am
Has thanked: 1 time
Been thanked: 10 times

Re: Yet another integer scaling question

Unread post by deepthaw »

Alkadian wrote: Wed Nov 04, 2020 2:24 pm @deepthaw,
Many thanks for your feedback! So if I understood correctly I can select the option 'scale to fit the screen height' without integer scaling and then enable the interpolation filter only?

Thanks!
I'd stick with integer scaling and just do an interpolation filter for horizontal. That's going to give you the best image quality. In fact, at 1600x1200 the only borders you should be seeing will be inherent to the game (most 240p games only display 224 lines to account for overscan. 1600/240 = an exact 5.)
User avatar
Alkadian
Top Contributor
Posts: 721
Joined: Thu May 28, 2020 9:55 am
Has thanked: 289 times
Been thanked: 116 times

Re: Yet another integer scaling question

Unread post by Alkadian »

Thanks again for your notes.
Just out of curiosity, while playing arcade cores I can see black borders around the picture if I select integer scaling. Is that normal then?
User avatar
aberu
Core Developer
Posts: 1144
Joined: Tue Jun 09, 2020 8:34 pm
Location: Longmont, CO
Has thanked: 244 times
Been thanked: 388 times
Contact:

Re: Yet another integer scaling question

Unread post by aberu »

Integer scaling is when the input resolution (like the SNES' resolution of 256x224) can only be scaled up in whole numbers, so 1x, 2x, 3x, 4x, 5x, etc... So you have a 1200p display. How many times does 224 go into 1200? 5.3571428571.... etc... So 5x with a remainder. That remainder is 80. So what you will have is 40 pixels on the top of the screen and 40 pixels on the bottom of the screen as a border. And since we still want the pixels that are scaled to be perfectly square, the left and right have a border to compensate.

Without integer scaling, aka full screen ("scale to fit the screen height"), occasionally a pixel will be just slightly not square, since now vertically across those 1200 pixels of your screen, you have to unevenly fit 224 pixels. That means those 80 pixels vertically that were "extra" (the remainder) have to be distributed evenly.

It's all simple math when you understand what it is doing.

What the person above means for shimmering is... When you enable scanline filters with Integer scaling, you have perfectly even distribution of scanlines for that resolution. When you stretch to the full screen and your division had a remainder, there will be inconsistencies between size of pixels, so you will see not only a weird effect when moving vertically, but you will also see unevenly sized scanlines, since those 80 pixels have to be distributed throughout.

hope this helps!
birdybro~
User avatar
Alkadian
Top Contributor
Posts: 721
Joined: Thu May 28, 2020 9:55 am
Has thanked: 289 times
Been thanked: 116 times

Re: Yet another integer scaling question

Unread post by Alkadian »

@aberu,
Many thanks to you as well for your so detailed notes. All very clear indeed! Since now on I will be happily using the integer scaling :D
User avatar
aberu
Core Developer
Posts: 1144
Joined: Tue Jun 09, 2020 8:34 pm
Location: Longmont, CO
Has thanked: 244 times
Been thanked: 388 times
Contact:

Re: Yet another integer scaling question

Unread post by aberu »

I find that Integer Scaling is easy to understand when you just point out it's math and show the remainder, but I don't see this explanation of it this way online very often. Explanations online seem to be too complicated. Glad I could help!
birdybro~
User avatar
NightShadowPT
Posts: 208
Joined: Mon May 25, 2020 9:56 am
Has thanked: 5 times
Been thanked: 9 times

Re: Yet another integer scaling question

Unread post by NightShadowPT »

Hi!

I'm a big fan of using integer scaling, especially because I also tend to like using scanlines and they will look horrible if the scaling is not an integer.

What I sometimes struggle with (mostly on the Amiga and ao486 cores) is how to ensure the screen is properly centered.

Are there any settings I can mess with to control this? (for the record I'm using the VGA output and I use a 4:3 LCD screen).

Cheers,
User avatar
LamerDeluxe
Top Contributor
Posts: 1160
Joined: Sun May 24, 2020 10:25 pm
Has thanked: 798 times
Been thanked: 257 times

Re: Yet another integer scaling question

Unread post by LamerDeluxe »

The problem I have with integer scaling is that it only applies to the height of the display. The width is scaled according to aspect-ratio, which is fine for games with horizontal orientation.

But when I have a vertically oriented arcade game and add vertical scan-lines, they look really bad. I wish there was an option to apply integer scaling to the width of the display, instead of the height.
User avatar
NightShadowPT
Posts: 208
Joined: Mon May 25, 2020 9:56 am
Has thanked: 5 times
Been thanked: 9 times

Re: Yet another integer scaling question

Unread post by NightShadowPT »

LamerDeluxe wrote: Wed Dec 30, 2020 10:19 am The problem I have with integer scaling is that it only applies to the height of the display. The width is scaled according to aspect-ratio, which is fine for games with horizontal orientation.

But when I have a vertically oriented arcade game and add vertical scan-lines, they look really bad. I wish there was an option to apply integer scaling to the width of the display, instead of the height.
Technically speaking, the games with vertical orientation are originally horizontal, but the monitor is rotated. That is why you expect the scanlines to be vertical in those games.

True to form, many of these games will allow you to keep the orientation of the image and you can rotate your monitor (as it should be). The scanlines will then look correct :D
User avatar
LamerDeluxe
Top Contributor
Posts: 1160
Joined: Sun May 24, 2020 10:25 pm
Has thanked: 798 times
Been thanked: 257 times

Re: Yet another integer scaling question

Unread post by LamerDeluxe »

NightShadowPT wrote: Wed Dec 30, 2020 12:52 pm
LamerDeluxe wrote: Wed Dec 30, 2020 10:19 am The problem I have with integer scaling is that it only applies to the height of the display. The width is scaled according to aspect-ratio, which is fine for games with horizontal orientation.

But when I have a vertically oriented arcade game and add vertical scan-lines, they look really bad. I wish there was an option to apply integer scaling to the width of the display, instead of the height.
Technically speaking, the games with vertical orientation are originally horizontal, but the monitor is rotated. That is why you expect the scanlines to be vertical in those games.

True to form, many of these games will allow you to keep the orientation of the image and you can rotate your monitor (as it should be). The scanlines will then look correct :D
Yes, that is why I apply vertical scanlines, which look bad because the image never uses integer scaling horizontally. My TFT displays don't rotate unfortunately.
Post Reply