VideoBackends: Do not use Anisotropy on Point filtered textures.

The D3D backend was always forcing Anisotropic filtering when that is enabled regardless of how the game chose to configure the texture filtering registers; this causes the same issues as "Force Filtering" without Anisotropy, such as causing game UI elements to no longer line up adjacent correctly. Historically, OpenGL's Anisotropy support has always worked "better" than D3D's due to seeming to not have this problem; unfortunately, OpenGL's Anisotropy specification only gives GL_LINEAR based filtering modes defined behavior, with only the mipmap setting being required to be considered. Some OpenGL implementations were implicitly disabling Anisotropy when the min/mag filters were set to GL_NEAREST, but this behavior is not required by the spec so cannot be relied on.
This commit is contained in:
EmptyChaos
2016-03-24 02:23:56 +00:00
parent 3ff56aa192
commit 902e5cddf7
9 changed files with 57 additions and 15 deletions

View File

@ -9,6 +9,7 @@
#include "VideoBackends/D3D/D3DBase.h"
#include "VideoBackends/D3D/D3DState.h"
#include "VideoCommon/SamplerCommon.h"
namespace DX11
{
@ -259,7 +260,7 @@ ID3D11SamplerState* StateCache::Get(SamplerState state)
unsigned int mip = d3dMipFilters[state.min_filter & 3];
if (state.max_anisotropy > 1)
if (state.max_anisotropy > 1 && !IsBpTexMode0PointFiltering(state))
{
sampdc.Filter = D3D11_FILTER_ANISOTROPIC;
sampdc.MaxAnisotropy = (u32)state.max_anisotropy;