flycast icon indicating copy to clipboard operation
flycast copied to clipboard

Nearest Neighbor/Integer screen scaling

Open EpicGamerNaeNae opened this issue 1 year ago • 4 comments

Is your feature request related to a problem? Please describe. By default, when playing at internal resolutions smaller than the window/screen, Flycast uses linear filtering to scale the image up, which results in a blurry image.

This behavior can be changed, by changing the texture filtering option from default or linear to nearest-neighbor, but displays the textures differently than was intended.

Describe the solution you'd like There should be an option for screen scaling, separate from the texture scaling option, to allow to choose between bilinear filtering, nearest neighbor, or integer scaling (displaying the game only at exact multiples of the original resolution). The sharper output would also help when using external filtering methods.

Describe alternatives you've considered External software like lossless scaling can be used to achieve nearest neighbor/integer scaling, but it is a bit finicky (at 1440p you need to set it to 2.999x scaling (854x480) to look as acceptable (because of that it stretches one pixel column slightly), since 3x (853x480) is one pixel off and makes the image look terrible), and isn't accessible to all users.

Additional context Screenshots at 1440p, with internal resolution at 1x:

Default texture filtering, textures look the way they're supposed to, but the image is blurry: image

Nearest Neighbor texture filtering, textures look worse, but the image is sharper: image

Default texture filtering, with lossless scaling resizing the window to 854x480 (scale factor 2.999 on a 1440p display, scaled up to 1440 using nearest neighbor on paint.net). Intended look for the textures, with a sharp image: image

EpicGamerNaeNae avatar Nov 28 '24 18:11 EpicGamerNaeNae

Duplicate of #1415

flyinghead avatar Nov 30 '24 16:11 flyinghead

It isn't a duplicate of #1415 as texture filtering isn't the same as screen scaling.

SpelzR2 avatar Dec 19 '24 10:12 SpelzR2

It isn't a duplicate of #1415 as texture filtering isn't the same as screen scaling.

Exactly, why is screen scaling filtering being confused with texture filtering? it most definately is not a duplicate of https://github.com/flyinghead/flycast/issues/1415

skullpanda86 avatar Apr 09 '25 02:04 skullpanda86

Fixed on the dev branch

flyinghead avatar Jun 13 '25 10:06 flyinghead