- fixed incomplete reordering of code.

This commit is contained in:
Christoph Oelckers 2018-07-23 21:17:57 +02:00
parent 6076f0a69d
commit 96bb8a779c
1 changed files with 1 additions and 1 deletions

View File

@ -310,6 +310,7 @@ void FRenderState::SetMaterial(FMaterial *mat, int clampmode, int translation, i
mShaderTimer = mat->tex->shaderspeed; mShaderTimer = mat->tex->shaderspeed;
SetSpecular(mat->tex->Glossiness, mat->tex->SpecularLevel); SetSpecular(mat->tex->Glossiness, mat->tex->SpecularLevel);
auto tex = mat->tex;
if (tex->UseType == ETextureType::SWCanvas) clampmode = CLAMP_NOFILTER; if (tex->UseType == ETextureType::SWCanvas) clampmode = CLAMP_NOFILTER;
if (tex->bHasCanvas) clampmode = CLAMP_CAMTEX; if (tex->bHasCanvas) clampmode = CLAMP_CAMTEX;
else if ((tex->bWarped || tex->shaderindex >= FIRST_USER_SHADER) && clampmode <= CLAMP_XY) clampmode = CLAMP_NONE; else if ((tex->bWarped || tex->shaderindex >= FIRST_USER_SHADER) && clampmode <= CLAMP_XY) clampmode = CLAMP_NONE;
@ -322,7 +323,6 @@ void FRenderState::SetMaterial(FMaterial *mat, int clampmode, int translation, i
int usebright = false; int usebright = false;
int maxbound = 0; int maxbound = 0;
auto tex = mat->tex;
// Textures that are already scaled in the texture lump will not get replaced by hires textures. // Textures that are already scaled in the texture lump will not get replaced by hires textures.
int flags = mat->isExpanded() ? CTF_Expand : (gl_texture_usehires && tex->Scale.X == 1 && tex->Scale.Y == 1 && clampmode <= CLAMP_XY) ? CTF_CheckHires : 0; int flags = mat->isExpanded() ? CTF_Expand : (gl_texture_usehires && tex->Scale.X == 1 && tex->Scale.Y == 1 && clampmode <= CLAMP_XY) ? CTF_CheckHires : 0;