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

Perform hdRatio division with floating point precision. Allows non-integer scaled HD textures, but their use is discouraged.

This commit is contained in:
S2S 2020-07-15 18:51:49 +02:00 committed by Sergey Lipskiy
parent 65ad89ae3a
commit d13a3d7890

View File

@ -673,8 +673,8 @@ void _updateCachedTexture(const GHQTexInfo & _info, CachedTexture *_pTexture, u1
_pTexture->scaleS = 1.0f / (_pTexture->maskS ? f32(pow2(widthOrg)) : f32(widthOrg));
_pTexture->scaleT = 1.0f / (_pTexture->maskT ? f32(pow2(heightOrg)) : f32(heightOrg));
_pTexture->hdRatioS = f32(_info.width / _pTexture->width);
_pTexture->hdRatioT = f32(_info.height / _pTexture->height);
_pTexture->hdRatioS = (f32)(_info.width) / (f32)(_pTexture->width);
_pTexture->hdRatioT = (f32)(_info.height) / (f32)(_pTexture->height);
_pTexture->bHDTexture = true;
}