mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-02-25 16:41:04 +00:00
Texture lod bias should be signed
This commit is contained in:
parent
d8df88bc1f
commit
a6523dd507
@ -1581,12 +1581,6 @@ void GLES_GPU::ExecuteOpInternal(u32 op, u32 diff) {
|
||||
#endif
|
||||
|
||||
case GE_CMD_TEXLEVEL:
|
||||
#ifndef MOBILE_DEVICE
|
||||
if (data == 1)
|
||||
WARN_LOG_REPORT_ONCE(texLevel1, G3D, "Unsupported texture level bias settings: %06x", data)
|
||||
else if (data != 0)
|
||||
WARN_LOG_REPORT_ONCE(texLevel2, G3D, "Unsupported texture level bias settings: %06x", data);
|
||||
#endif
|
||||
if (diff)
|
||||
gstate_c.textureChanged = true;
|
||||
break;
|
||||
|
@ -489,8 +489,8 @@ void TextureCache::UpdateSamplingParams(TexCacheEntry &entry, bool force) {
|
||||
// Enforce no mip filtering, for safety.
|
||||
minFilt &= 1; // no mipmaps yet
|
||||
} else {
|
||||
// TODO: Is this a signed value? Which direction?
|
||||
float lodBias = 0.0; // -(float)((gstate.texlevel >> 16) & 0xFF) / 16.0f;
|
||||
// Texture lod bias should be signed.
|
||||
float lodBias = (float)(int)(s8)((gstate.texlevel >> 16) & 0xFF) / 16.0f;
|
||||
if (force || entry.lodBias != lodBias) {
|
||||
#ifndef USING_GLES2
|
||||
glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_LOD_BIAS, lodBias);
|
||||
|
Loading…
x
Reference in New Issue
Block a user