mirror of
https://github.com/DrBeef/Raze.git
synced 2024-11-14 16:40:46 +00:00
- fixed: Toggling palette emulation should reset the texture filter in the samplers.
This commit is contained in:
parent
16a4d49268
commit
e95fea1056
3 changed files with 2 additions and 6 deletions
|
@ -35,6 +35,7 @@ bool hw_int_useindexedcolortextures;
|
|||
CUSTOM_CVARD(Bool, hw_useindexedcolortextures, false, CVAR_ARCHIVE | CVAR_GLOBALCONFIG, "enable/disable indexed color texture rendering")
|
||||
{
|
||||
hw_int_useindexedcolortextures = self;
|
||||
if (screen) screen->SetTextureFilterMode();
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -125,7 +125,7 @@ void FSamplerManager::SetTextureFilterMode()
|
|||
{
|
||||
glSamplerParameteri(mSamplers[i], GL_TEXTURE_MIN_FILTER, TexFilter[filter].minfilter);
|
||||
glSamplerParameteri(mSamplers[i], GL_TEXTURE_MAG_FILTER, TexFilter[filter].magfilter);
|
||||
glSamplerParameterf(mSamplers[i], GL_TEXTURE_MAX_ANISOTROPY_EXT, gl_texture_filter_anisotropic);
|
||||
glSamplerParameterf(mSamplers[i], GL_TEXTURE_MAX_ANISOTROPY_EXT, filter > 0? gl_texture_filter_anisotropic : 1.0);
|
||||
}
|
||||
glSamplerParameteri(mSamplers[CLAMP_XY_NOMIP], GL_TEXTURE_MIN_FILTER, TexFilter[filter].magfilter);
|
||||
glSamplerParameteri(mSamplers[CLAMP_XY_NOMIP], GL_TEXTURE_MAG_FILTER, TexFilter[filter].magfilter);
|
||||
|
|
|
@ -70,11 +70,6 @@ bool GLInstance::SetTexture(int picnum, FGameTexture* tex, int paletteid, int sa
|
|||
if (!PickTexture(picnum, tex, paletteid, texpick)) return false;
|
||||
|
||||
int TextureType = (texpick.translation & 0x80000000) ? TT_INDEXED : TT_TRUECOLOR;
|
||||
if (TextureType == TT_INDEXED)
|
||||
{
|
||||
sampler = sampler + CLAMP_NOFILTER - CLAMP_NONE;
|
||||
}
|
||||
|
||||
|
||||
// This is intentionally the same value for both parameters. The shader does not use the same uniform for modulation and overlay colors.
|
||||
SetTinting(texpick.tintFlags, texpick.tintColor, texpick.tintColor);
|
||||
|
|
Loading…
Reference in a new issue