-
Notifications
You must be signed in to change notification settings - Fork 199
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Suggestion: use combination of point resizing and bicubic scaling to improve image quality #1366
Comments
POC to implement this: master...Ghabry:sdl-scaling I removed There are now two textures: sdl_texture_game --(renders int scaled on)--> sdl_texture_scaled --(renders fractional scaled on)--> Display When the window is a multiple of 320x240 in one dimension only int scaling is done. FIXME: When the Window is <320x240 nothing is displayed |
1. When the window is not an integer aspect ratio create an intermediate texture that is one scale factor higher than the window 2. Then Blit on it with nearest neighbour 3. Then Blit on the screen with bilinear downscale Fix EasyRPG#1366
1. When the window is not an integer aspect ratio create an intermediate texture that is one scale factor higher than the window 2. Then Blit on it with nearest neighbour 3. Then Blit on the screen with bilinear downscale Fix EasyRPG#1366
1. When the window is not an integer aspect ratio create an intermediate texture that is one scale factor higher than the window 2. Then Blit on it with nearest neighbour 3. Then Blit on the screen with bilinear downscale Fix EasyRPG#1366
A short time ago I filed #1364 - but what I actually wanted to file was at the time was this.
At the moment, it seems that EasyRPG uses point resizing. A game window has to be sized a multiple of 320x240 in order to have consistent pixel sizes across the whole image. So when the viewport is slightly off, like in #1364, you get a combination of different pixel sizes in the rendered image:
That's why I would recommend the following: use point upscaling to render a buffer at the closest multiple of 320x240 to the viewport size. Then use bicubic scaling to get to the exact viewport size.
In my view, this is the best way to maintain the integrity of pixel art for arbitrary screen sizes.
Here's a comparison of the current behavior, plus an example in which I used point resizing and bicubic resizing:
I'm only checking this on Mac OS X, but I'm not sure on which other platforms this behavior is the same.
Name of the game:
Any.
Player platform:
Mac OS X 10.13.4, but I presume behavior is the same everywhere.
The text was updated successfully, but these errors were encountered: