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

Disable texture filtering for texrects if txFilterIgnoreBG is on.

This commit is contained in:
Sergey Lipskiy 2014-11-29 19:41:13 +06:00
parent 8d17023217
commit a5360657f9
2 changed files with 3 additions and 1 deletions

View File

@ -533,6 +533,7 @@ void RDP_ProcessRDPList()
u32 w1 = RDP.cmd_data[RDP.cmd_cur+1];
RDP.w2 = RDP.cmd_data[RDP.cmd_cur+2];
RDP.w3 = RDP.cmd_data[RDP.cmd_cur + 3];
RSP.cmd = cmd;
LLEcmd[cmd](w0, w1);
RDP.cmd_cur = (RDP.cmd_cur + CmdLength[cmd] / 4) & maxCMDMask;

View File

@ -904,7 +904,8 @@ void TextureCache::_load(u32 _tile, CachedTexture *_pTexture)
}
bool bLoaded = false;
if (TFH.isInited() && maxLevel == 0) {
if (TFH.isInited() && maxLevel == 0 && (config.textureFilter.txFilterIgnoreBG == 0 || (RSP.cmd != G_TEXRECT && RSP.cmd != G_TEXRECTFLIP)))
{
GHQTexInfo ghqTexInfo;
if (txfilter_filter((u8*)pDest, tmptex.realWidth, tmptex.realHeight, glInternalFormat, (uint64)_pTexture->crc, &ghqTexInfo) != 0 && ghqTexInfo.data != NULL) {
glTexImage2D(GL_TEXTURE_2D, 0, ghqTexInfo.format, ghqTexInfo.width, ghqTexInfo.height, 0, ghqTexInfo.texture_format, ghqTexInfo.pixel_type, ghqTexInfo.data);