1
0
mirror of https://github.com/blawar/GLideN64.git synced 2024-07-04 10:03:36 +00:00

Fix texture filtering when mip-mapiing is off, #1699

This commit is contained in:
Sergey Lipskiy 2018-01-03 17:09:23 +07:00
parent 64335733e5
commit 210315ec46

View File

@ -1310,12 +1310,19 @@ void TextureCache::activateTexture(u32 _t, CachedTexture *_pTexture)
const s32 texLevel = bUseLOD ? _pTexture->max_level : 0;
params.maxMipmapLevel = Parameter(texLevel);
if (texLevel > 0) { // Apply standard bilinear to mipmap textures
if (bUseLOD) {
if (bUseBilinear) {
params.minFilter = textureParameters::FILTER_LINEAR_MIPMAP_NEAREST;
// Apply standard bilinear to mipmap textures
if (texLevel > 0)
params.minFilter = textureParameters::FILTER_LINEAR_MIPMAP_NEAREST;
else
params.minFilter = textureParameters::FILTER_LINEAR;
params.magFilter = textureParameters::FILTER_LINEAR;
} else {
params.minFilter = textureParameters::FILTER_NEAREST_MIPMAP_NEAREST;
if (texLevel > 0)
params.minFilter = textureParameters::FILTER_NEAREST_MIPMAP_NEAREST;
else
params.minFilter = textureParameters::FILTER_NEAREST;
params.magFilter = textureParameters::FILTER_NEAREST;
}
} else if (bUseBilinear && config.generalEmulation.enableLOD != 0 && bUseLOD) { // Apply standard bilinear to first tile of mipmap texture