From b80dd2030abb53ba66c9dce4b7a0b17a87ccae57 Mon Sep 17 00:00:00 2001 From: Kaldaien Date: Thu, 12 Dec 2024 12:46:29 -0500 Subject: [PATCH] Disabled anisotropic filtering optimizations in Metaphor: ReFantazio because most textures are not mipmap-complete --- CHANGELOG.txt | 7 ++++- include/SpecialK/DLL_VERSION.H | 2 +- src/render/d3d11/hooks/d3d11_device.cpp | 35 +++---------------------- 3 files changed, 10 insertions(+), 34 deletions(-) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 4132f5b16..ef66e7d77 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -1,4 +1,9 @@ -24.12.8 +24.12.12 +======== + + Disabled anisotropic filtering optimizations in Metaphor: ReFantazio because + most textures are not mipmap-complete. + +24.12.8 ======= + Uncommented checks for PlayStation controllers when a game uses Windows.Gaming.Input warning about potential incompatibility. diff --git a/include/SpecialK/DLL_VERSION.H b/include/SpecialK/DLL_VERSION.H index c704d3e8f..74da0d130 100644 --- a/include/SpecialK/DLL_VERSION.H +++ b/include/SpecialK/DLL_VERSION.H @@ -2,7 +2,7 @@ #define SK_YEAR 24 #define SK_MONTH 12 -#define SK_DATE 8 +#define SK_DATE 12 #define SK_REV_N 0 #define SK_REV 0 diff --git a/src/render/d3d11/hooks/d3d11_device.cpp b/src/render/d3d11/hooks/d3d11_device.cpp index f00f0ca52..9b3f64c3a 100644 --- a/src/render/d3d11/hooks/d3d11_device.cpp +++ b/src/render/d3d11/hooks/d3d11_device.cpp @@ -514,17 +514,6 @@ D3D11Dev_CreateShaderResourceView1_Override ( if (pResource == nullptr) return E_INVALIDARG; - if (SK_GetCurrentGameID () == SK_GAME_ID::Metaphor && - pDesc != nullptr && - pDesc->ViewDimension == D3D11_SRV_DIMENSION_TEXTURE2D) - { - if (DirectX::IsCompressed (pDesc->Format)) - { - ((D3D11_SHADER_RESOURCE_VIEW_DESC*)pDesc)->Texture2D.MostDetailedMip = 0; - ((D3D11_SHADER_RESOURCE_VIEW_DESC*)pDesc)->Texture2D.MipLevels = (UINT)-1; - } - } - D3D11_SHADER_RESOURCE_VIEW_DESC1 desc = { .Format = DXGI_FORMAT_UNKNOWN, .ViewDimension = D3D11_SRV_DIMENSION_TEXTURE2D, @@ -838,23 +827,6 @@ D3D11Dev_CreateDepthStencilView_Override ( (pDesc_ != nullptr) ? &_desc : nullptr; -#if 0 - if (pDesc != nullptr && SK_IsCurrentGame (SK_GAME_ID::Metaphor)) - { - // Depth Buffer Upgrade for Less Aliasing... - if (pDesc->Format == DXGI_FORMAT_D24_UNORM_S8_UINT) - pDesc->Format = DXGI_FORMAT_D32_FLOAT_S8X24_UINT; - else - { - if (pDesc->Format == DXGI_FORMAT_UNKNOWN || - pDesc->Format == DXGI_FORMAT_R32G8X24_TYPELESS) - { - pDesc->Format = DXGI_FORMAT_D32_FLOAT_S8X24_UINT; - } - } - } -#endif - #ifdef _SK_D3D11_VALIDATE_DEVICE_RESOURCES if (pResource != nullptr) { @@ -1295,7 +1267,7 @@ D3D11Dev_CreateSamplerState_Override new_desc.ComparisonFunc, new_desc.AddressU, new_desc.AddressV, new_desc.AddressW, SK_SummarizeCaller ().c_str () ); #endif -#pragma region "UglyGameHacksThatShouldNotBeHere" +#pragma region UglyGameHacksThatShouldNotBeHere static const bool bShenmue = SK_GetCurrentGameID () == SK_GAME_ID::Shenmue; @@ -1475,9 +1447,7 @@ D3D11Dev_CreateSamplerState_Override } } #endif -#pragma endregion - -#if 1 +#if 0 if (SK_GetCurrentGameID () == SK_GAME_ID::Metaphor) { if ( new_desc.Filter <= D3D11_FILTER_ANISOTROPIC && @@ -1500,6 +1470,7 @@ D3D11Dev_CreateSamplerState_Override } } #endif +#pragma endregion // // Modern codepath for generic configurable sampler overrides