mirror of
https://github.com/hedge-dev/UnleashedRecomp.git
synced 2025-04-28 13:27:58 +03:00
Force enable anisotropic filtering.
This commit is contained in:
parent
c5e195fef3
commit
5e61febab1
1 changed files with 11 additions and 3 deletions
|
@ -1357,11 +1357,18 @@ static void FlushRenderState(GuestDevice* device)
|
|||
const auto addressU = ConvertTextureAddressMode((device->samplerStates[i].data[0].get() >> 10) & 0x7);
|
||||
const auto addressV = ConvertTextureAddressMode((device->samplerStates[i].data[0].get() >> 13) & 0x7);
|
||||
const auto addressW = ConvertTextureAddressMode((device->samplerStates[i].data[0].get() >> 16) & 0x7);
|
||||
const auto magFilter = ConvertTextureFilter((device->samplerStates[i].data[3].get() >> 19) & 0x3);
|
||||
const auto minFilter = ConvertTextureFilter((device->samplerStates[i].data[3].get() >> 21) & 0x3);
|
||||
const auto mipFilter = ConvertTextureFilter((device->samplerStates[i].data[3].get() >> 23) & 0x3);
|
||||
auto magFilter = ConvertTextureFilter((device->samplerStates[i].data[3].get() >> 19) & 0x3);
|
||||
auto minFilter = ConvertTextureFilter((device->samplerStates[i].data[3].get() >> 21) & 0x3);
|
||||
auto mipFilter = ConvertTextureFilter((device->samplerStates[i].data[3].get() >> 23) & 0x3);
|
||||
const auto borderColor = ConvertBorderColor(device->samplerStates[i].data[5].get() & 0x3);
|
||||
|
||||
bool anisotropyEnabled = mipFilter == RenderFilter::LINEAR;
|
||||
if (anisotropyEnabled)
|
||||
{
|
||||
magFilter = RenderFilter::LINEAR;
|
||||
minFilter = RenderFilter::LINEAR;
|
||||
}
|
||||
|
||||
auto& samplerDesc = g_samplerDescs[i];
|
||||
|
||||
bool dirty = false;
|
||||
|
@ -1372,6 +1379,7 @@ static void FlushRenderState(GuestDevice* device)
|
|||
SetDirtyValue(dirty, samplerDesc.minFilter, minFilter);
|
||||
SetDirtyValue(dirty, samplerDesc.magFilter, magFilter);
|
||||
SetDirtyValue(dirty, samplerDesc.mipmapMode, RenderMipmapMode(mipFilter));
|
||||
SetDirtyValue(dirty, samplerDesc.anisotropyEnabled, anisotropyEnabled);
|
||||
SetDirtyValue(dirty, samplerDesc.borderColor, borderColor);
|
||||
|
||||
if (dirty)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue