1
0
mirror of https://github.com/blawar/GLideN64.git synced 2024-07-02 09:03:37 +00:00

Correct condition for texture filtering: remove (gSP.objRendermode&G_OBJRM_BILERP) != 0 from the condition.

It seems that flag G_OBJRM_BILERP in objRendermode does not mean that texture will be filtered.
This commit is contained in:
Sergey Lipskiy 2018-09-01 19:43:58 +07:00
parent 0da701e7e5
commit 9f936be57e
3 changed files with 2 additions and 4 deletions

View File

@ -515,8 +515,6 @@ public:
void update(bool _force) override
{
int textureFilter = gDP.otherMode.textureFilter;
if ((gSP.objRendermode&G_OBJRM_BILERP) != 0)
textureFilter |= 2;
uTextureFilterMode.set(textureFilter, _force);
uTextureFormat.set(gSP.textureTile[0]->format, gSP.textureTile[1]->format, _force);
uTextureConvert.set(gDP.otherMode.convert_one, _force);

View File

@ -1158,7 +1158,7 @@ void GraphicsDrawer::drawTexturedRect(const TexturedRectParams & _params)
const FrameBuffer * pCurrentBuffer = _params.pBuffer;
DisplayWindow & wnd = dwnd();
TextureCache & cache = textureCache();
const bool bUseBilinear = (gDP.otherMode.textureFilter | (gSP.objRendermode&G_OBJRM_BILERP)) != 0;
const bool bUseBilinear = gDP.otherMode.textureFilter != 0;
const bool bUseTexrectDrawer = config.generalEmulation.enableNativeResTexrects != 0
&& bUseBilinear
&& pCurrentCombiner->usesTexture()

View File

@ -1302,7 +1302,7 @@ void TextureCache::activateTexture(u32 _t, CachedTexture *_pTexture)
params.target = textureTarget::TEXTURE_2D;
params.textureUnitIndex = textureIndices::Tex[_t];
const bool bUseBilinear = (gDP.otherMode.textureFilter | (gSP.objRendermode&G_OBJRM_BILERP)) != 0;
const bool bUseBilinear = gDP.otherMode.textureFilter != 0;
const bool bUseLOD = currentCombiner()->usesLOD();
const s32 texLevel = bUseLOD ? _pTexture->max_level : 0;
params.maxMipmapLevel = Parameter(texLevel);