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

Force texture wrap/mirror for hires textures when texture size is half of real (load) texture size.

Fixed Majora's Mask - custom textures broken on moon #1662
This commit is contained in:
Sergey Lipskiy 2017-11-16 18:00:52 +07:00
parent 038c74af12
commit e1c7a44593

View File

@ -706,10 +706,16 @@ void _updateCachedTexture(const GHQTexInfo & _info, CachedTexture *_pTexture, f3
_pTexture->textureBytes <<= 2;
}
if (_pTexture->realWidth == _pTexture->width * 2)
_pTexture->clampS = 0; // force wrap or mirror s
if (_pTexture->realHeight == _pTexture->height * 2)
_pTexture->clampT = 0; // force wrap or mirror t
_pTexture->realWidth = _info.width;
_pTexture->realHeight = _info.height;
_pTexture->scaleS = _scale / f32(_info.width);
_pTexture->scaleT = _scale / f32(_info.height);
_pTexture->bHDTexture = true;
}