Integer Scaling + Screen-Level Linear Interpolation Options#1976
Integer Scaling + Screen-Level Linear Interpolation Options#1976flyinghead merged 10 commits intoflyinghead:devfrom
Conversation
|
Thanks for the feedback! Great catch on the games with unusual framebuffer sizes, that dovetails well with removing |
… anamorphic widescreen option
core/cfg/option.cpp
Outdated
| Option<int> MaxThreads("pvr.MaxThreads", 3); | ||
| Option<int> AutoSkipFrame("pvr.AutoSkipFrame", 0); | ||
| Option<int> RenderResolution("rend.Resolution", 480); | ||
| Option<bool> AnamorphicWidescreen("rend.AnamorphicWidescreen", false); |
There was a problem hiding this comment.
I'd rather avoid adding yet another option. The usual way to handle games that support anamorphic widescreen is to manually set Horizontal Stretching to 133%. And this setting should go in the Aspect Ratio section where there are already two distinct widescreen options...
core/rend/transform_matrix.h
Outdated
| return aspectRatio * config::ScreenStretching / 100.f; | ||
| } | ||
|
|
||
| #include <stdio.h> |
|
Regarding the libretro build failures, you can define (dummy) options in |





Standalone Flycast currently applies linear interpolation to the entire screen when the Texture Filtering option is set to "Default," which may be undesirable to those hoping for crisp output. Using the "Force Nearest Neighbor" option will alleviate this, but at the cost of removing linear filtering for in-game textures, which were intentional uses of filtering by the developers. I have decoupled the Texturing Filtering option from the screen scaling implementation by introducing a second option for Linear Interpolation. When unchecked, the screen is interpolated using Nearest Neighbor. This favors perfectly whole multiples of the original image to avoid misshaped pixels, and so I have also added an Integer Scale feature. Using this will automatically scale the image to the largest integer multiple it can within the display size. These features have been requested before in issues #1415 and #1759.
The implementation adds two Boolean options: Integer Scaling and Linear Interpolation. Each resides in the Video tab under Internal Resolution within the Rendering Options section. A new inline function in
rend/transform_matrix.hcalledgetWindowboxDimensions()has been added. This now contains the old letter/pillarboxing code used for screen scaling, which still runs when Integer Scaling is false (which it is by default). Locations containing this old code in each of the four renderer backends have been altered to contain the new function. Additionally, function calls for rendering the screen post-windowbox calculation have been changed to use the Linear Interpolation option instead of Texture Filtering, while the Texture Filtering option has been retained for all internal texture checks.This code has been confirmed to work with all internal resolution options, Widescreen mode, and Rotate 90° mode. Super Widescreen mode is now disabled when the Integer Scaling option is true. These options have been tested in all four rendering backends. I was able to verify that the additions build and work on both Windows 11 and Linux Mint 21.
Bangai-O with default settings (native res, no integer scaling, linear interpolation).

Bangai-O with new settings (native res, integer scaling, nearest neighbor interpolation).

Psyvariar 2 with new settings in TATE mode (integer scaling, nearest neighbor, rotate 90).
