mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04:00
Always use a linear filter for video, unless forcing NEAREST filtering.
This commit is contained in:
parent
c9693ee061
commit
cea35007ae
9 changed files with 14 additions and 18 deletions
|
@ -821,6 +821,7 @@ static ConfigSetting graphicsSettings[] = {
|
|||
|
||||
ConfigSetting("ClearFramebuffersOnFirstUseHack", &g_Config.bClearFramebuffersOnFirstUseHack, false, true, true),
|
||||
|
||||
|
||||
ConfigSetting(false),
|
||||
};
|
||||
|
||||
|
|
|
@ -186,6 +186,7 @@ public:
|
|||
bool bFullScreenMulti;
|
||||
int iInternalResolution; // 0 = Auto (native), 1 = 1x (480x272), 2 = 2x, 3 = 3x, 4 = 4x and so on.
|
||||
int iAnisotropyLevel; // 0 - 5, powers of 2: 0 = 1x = no aniso
|
||||
int iMipmapMode; // 0 = default, 1 = performance, 2 = quality
|
||||
int bHighQualityDepth;
|
||||
bool bReplaceTextures;
|
||||
bool bSaveNewTextures;
|
||||
|
|
|
@ -175,7 +175,7 @@ void TextureCacheCommon::GetSamplingParams(int &minFilt, int &magFilt, bool &sCl
|
|||
lodBias = 0.0f;
|
||||
}
|
||||
|
||||
if (!(magFilt & 1) && addr != 0 && g_Config.iTexFiltering == TEX_FILTER_LINEAR_VIDEO) {
|
||||
if (!(magFilt & 1) && addr != 0 && g_Config.iTexFiltering != TEX_FILTER_FORCE_NEAREST) {
|
||||
if (videos_.find(addr & 0x3FFFFFFF) != videos_.end()) {
|
||||
magFilt |= 1;
|
||||
minFilt |= 1;
|
||||
|
@ -183,14 +183,14 @@ void TextureCacheCommon::GetSamplingParams(int &minFilt, int &magFilt, bool &sCl
|
|||
}
|
||||
|
||||
// Filtering overrides
|
||||
if (g_Config.iTexFiltering == TEX_FILTER_LINEAR) {
|
||||
if (g_Config.iTexFiltering == TEX_FILTER_FORCE_LINEAR) {
|
||||
// Only override to linear filtering if there's no alpha or color testing going on.
|
||||
if ((!gstate.isColorTestEnabled() || IsColorTestTriviallyTrue()) &&
|
||||
(!gstate.isAlphaTestEnabled() || IsAlphaTestTriviallyTrue())) {
|
||||
magFilt |= 1;
|
||||
minFilt |= 1;
|
||||
}
|
||||
} else if (g_Config.iTexFiltering == TEX_FILTER_NEAREST ||
|
||||
} else if (g_Config.iTexFiltering == TEX_FILTER_FORCE_NEAREST ||
|
||||
(gstate.isModeThrough() && g_Config.iInternalResolution != 1 &&
|
||||
gstate.isColorTestEnabled() && !IsColorTestTriviallyTrue() && gstate.getColorTestRef() != 0)) {
|
||||
// Force Nearest when override is on, or color test enabled and rendering resolution greater than 480x272
|
||||
|
|
|
@ -30,9 +30,8 @@
|
|||
|
||||
enum TextureFiltering {
|
||||
TEX_FILTER_AUTO = 1,
|
||||
TEX_FILTER_NEAREST = 2,
|
||||
TEX_FILTER_LINEAR = 3,
|
||||
TEX_FILTER_LINEAR_VIDEO = 4,
|
||||
TEX_FILTER_FORCE_NEAREST = 2,
|
||||
TEX_FILTER_FORCE_LINEAR = 3,
|
||||
};
|
||||
|
||||
enum FramebufferNotification {
|
||||
|
|
|
@ -1036,9 +1036,9 @@ static inline void CalculateSamplingParams(const float ds, const float dt, const
|
|||
levelFrac = 0;
|
||||
}
|
||||
|
||||
if (g_Config.iTexFiltering == TEX_FILTER_LINEAR) {
|
||||
if (g_Config.iTexFiltering == TEX_FILTER_FORCE_LINEAR) {
|
||||
filt = true;
|
||||
} else if (g_Config.iTexFiltering == TEX_FILTER_NEAREST) {
|
||||
} else if (g_Config.iTexFiltering == TEX_FILTER_FORCE_NEAREST) {
|
||||
filt = false;
|
||||
} else {
|
||||
filt = detail > 0 ? gstate.isMinifyFilteringEnabled() : gstate.isMagnifyFilteringEnabled();
|
||||
|
|
|
@ -512,7 +512,7 @@ void GameSettingsScreen::CreateViews() {
|
|||
PopupMultiChoice *anisoFiltering = graphicsSettings->Add(new PopupMultiChoice(&g_Config.iAnisotropyLevel, gr->T("Anisotropic Filtering"), anisoLevels, 0, ARRAY_SIZE(anisoLevels), gr->GetName(), screenManager()));
|
||||
anisoFiltering->SetDisabledPtr(&g_Config.bSoftwareRendering);
|
||||
|
||||
static const char *texFilters[] = { "Auto", "Nearest", "Linear", "Linear on FMV", };
|
||||
static const char *texFilters[] = { "Auto", "Nearest", "Linear" };
|
||||
graphicsSettings->Add(new PopupMultiChoice(&g_Config.iTexFiltering, gr->T("Texture Filter"), texFilters, 1, ARRAY_SIZE(texFilters), gr->GetName(), screenManager()));
|
||||
|
||||
static const char *bufFilters[] = { "Linear", "Nearest", };
|
||||
|
|
|
@ -313,7 +313,6 @@ namespace MainWindow {
|
|||
TranslateMenuItem(menu, ID_OPTIONS_TEXTUREFILTERING_AUTO);
|
||||
TranslateMenuItem(menu, ID_OPTIONS_NEARESTFILTERING);
|
||||
TranslateMenuItem(menu, ID_OPTIONS_LINEARFILTERING);
|
||||
TranslateMenuItem(menu, ID_OPTIONS_LINEARFILTERING_CG);
|
||||
TranslateMenuItem(menu, ID_OPTIONS_SCREENFILTER_MENU);
|
||||
TranslateMenuItem(menu, ID_OPTIONS_BUFLINEARFILTER);
|
||||
TranslateMenuItem(menu, ID_OPTIONS_BUFNEARESTFILTER);
|
||||
|
@ -979,9 +978,8 @@ namespace MainWindow {
|
|||
break;
|
||||
|
||||
case ID_OPTIONS_TEXTUREFILTERING_AUTO: setTexFiltering(TEX_FILTER_AUTO); break;
|
||||
case ID_OPTIONS_NEARESTFILTERING: setTexFiltering(TEX_FILTER_NEAREST); break;
|
||||
case ID_OPTIONS_LINEARFILTERING: setTexFiltering(TEX_FILTER_LINEAR); break;
|
||||
case ID_OPTIONS_LINEARFILTERING_CG: setTexFiltering(TEX_FILTER_LINEAR_VIDEO); break;
|
||||
case ID_OPTIONS_NEARESTFILTERING: setTexFiltering(TEX_FILTER_FORCE_NEAREST); break;
|
||||
case ID_OPTIONS_LINEARFILTERING: setTexFiltering(TEX_FILTER_FORCE_LINEAR); break;
|
||||
|
||||
case ID_OPTIONS_BUFLINEARFILTER: setBufFilter(SCALE_LINEAR); break;
|
||||
case ID_OPTIONS_BUFNEARESTFILTER: setBufFilter(SCALE_NEAREST); break;
|
||||
|
@ -1221,12 +1219,11 @@ namespace MainWindow {
|
|||
ID_OPTIONS_TEXTUREFILTERING_AUTO,
|
||||
ID_OPTIONS_NEARESTFILTERING,
|
||||
ID_OPTIONS_LINEARFILTERING,
|
||||
ID_OPTIONS_LINEARFILTERING_CG,
|
||||
};
|
||||
if (g_Config.iTexFiltering < TEX_FILTER_AUTO)
|
||||
g_Config.iTexFiltering = TEX_FILTER_AUTO;
|
||||
else if (g_Config.iTexFiltering > TEX_FILTER_LINEAR_VIDEO)
|
||||
g_Config.iTexFiltering = TEX_FILTER_LINEAR_VIDEO;
|
||||
else if (g_Config.iTexFiltering > TEX_FILTER_FORCE_LINEAR)
|
||||
g_Config.iTexFiltering = TEX_FILTER_FORCE_LINEAR;
|
||||
|
||||
for (int i = 0; i < ARRAY_SIZE(texfilteringitems); i++) {
|
||||
CheckMenuItem(menu, texfilteringitems[i], MF_BYCOMMAND | ((i + 1) == g_Config.iTexFiltering ? MF_CHECKED : MF_UNCHECKED));
|
||||
|
|
|
@ -629,7 +629,6 @@ BEGIN
|
|||
MENUITEM "Auto", ID_OPTIONS_TEXTUREFILTERING_AUTO
|
||||
MENUITEM "Nearest", ID_OPTIONS_NEARESTFILTERING
|
||||
MENUITEM "Linear", ID_OPTIONS_LINEARFILTERING
|
||||
MENUITEM "Linear on FMV", ID_OPTIONS_LINEARFILTERING_CG
|
||||
END
|
||||
POPUP "Screen Scaling Filter", ID_OPTIONS_SCREENFILTER_MENU
|
||||
BEGIN
|
||||
|
|
|
@ -242,7 +242,6 @@
|
|||
#define ID_OPTIONS_TEXTUREFILTERING_AUTO 40067
|
||||
#define ID_OPTIONS_NEARESTFILTERING 40068
|
||||
#define ID_DISASM_DISASSEMBLETOFILE 40069
|
||||
#define ID_OPTIONS_LINEARFILTERING_CG 40070
|
||||
#define ID_DISASM_DISABLEBREAKPOINT 40071
|
||||
#define ID_DISASM_THREAD_FORCERUN 40072
|
||||
#define ID_DISASM_THREAD_KILL 40073
|
||||
|
|
Loading…
Add table
Reference in a new issue