mirror of
https://git.do.srb2.org/STJr/UltimateZoneBuilder.git
synced 2024-11-26 13:51:40 +00:00
Fix wrong mipmapping filtering and missing anisotropy
This commit is contained in:
parent
061fa30a45
commit
b466035bc8
1 changed files with 4 additions and 2 deletions
|
@ -282,7 +282,7 @@ GLint GLRenderDevice::GetGLMinFilter(TextureFilter filter, TextureFilter mipfilt
|
||||||
if (mipfilter == TextureFilter::Linear)
|
if (mipfilter == TextureFilter::Linear)
|
||||||
{
|
{
|
||||||
if (filter == TextureFilter::Point || filter == TextureFilter::None)
|
if (filter == TextureFilter::Point || filter == TextureFilter::None)
|
||||||
return GL_LINEAR_MIPMAP_NEAREST;
|
return GL_NEAREST_MIPMAP_LINEAR;
|
||||||
else
|
else
|
||||||
return GL_LINEAR_MIPMAP_LINEAR;
|
return GL_LINEAR_MIPMAP_LINEAR;
|
||||||
}
|
}
|
||||||
|
@ -291,7 +291,7 @@ GLint GLRenderDevice::GetGLMinFilter(TextureFilter filter, TextureFilter mipfilt
|
||||||
if (filter == TextureFilter::Point || filter == TextureFilter::None)
|
if (filter == TextureFilter::Point || filter == TextureFilter::None)
|
||||||
return GL_NEAREST_MIPMAP_NEAREST;
|
return GL_NEAREST_MIPMAP_NEAREST;
|
||||||
else
|
else
|
||||||
return GL_NEAREST_MIPMAP_LINEAR;
|
return GL_LINEAR_MIPMAP_NEAREST;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -914,6 +914,8 @@ bool GLRenderDevice::ApplyTextures()
|
||||||
glSamplerParameteri(samplerHandle, GL_TEXTURE_WRAP_S, wrapMode[(int)mTextureUnit.WrapMode]);
|
glSamplerParameteri(samplerHandle, GL_TEXTURE_WRAP_S, wrapMode[(int)mTextureUnit.WrapMode]);
|
||||||
glSamplerParameteri(samplerHandle, GL_TEXTURE_WRAP_T, wrapMode[(int)mTextureUnit.WrapMode]);
|
glSamplerParameteri(samplerHandle, GL_TEXTURE_WRAP_T, wrapMode[(int)mTextureUnit.WrapMode]);
|
||||||
glSamplerParameteri(samplerHandle, GL_TEXTURE_WRAP_R, wrapMode[(int)mTextureUnit.WrapMode]);
|
glSamplerParameteri(samplerHandle, GL_TEXTURE_WRAP_R, wrapMode[(int)mTextureUnit.WrapMode]);
|
||||||
|
if (mSamplerFilterKey.MaxAnisotropy > 0.0f)
|
||||||
|
glSamplerParameterf(samplerHandle, GL_TEXTURE_MAX_ANISOTROPY_EXT, mSamplerFilterKey.MaxAnisotropy);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mTextureUnit.SamplerHandle != samplerHandle)
|
if (mTextureUnit.SamplerHandle != samplerHandle)
|
||||||
|
|
Loading…
Reference in a new issue