- must set up fog before textures.

Otherwise the PickTexture callback won't get all needed info.
This commit is contained in:
Christoph Oelckers 2021-04-07 10:30:49 +02:00
parent 3d846f341a
commit f9f1d591b3

View file

@ -190,11 +190,8 @@ void HWWall::RenderMirrorSurface(HWDrawInfo *di, FRenderState &state)
void HWWall::RenderTexturedWall(HWDrawInfo *di, FRenderState &state, int rflags) void HWWall::RenderTexturedWall(HWDrawInfo *di, FRenderState &state, int rflags)
{ {
//int tmode = state.GetTextureMode();
state.SetMaterial(texture, UF_Texture, 0, sprite == nullptr? (flags & (HWF_CLAMPX | HWF_CLAMPY)) : CLAMP_XY, TRANSLATION(Translation_Remap + curbasepal, palette), -1);
SetLightAndFog(state); SetLightAndFog(state);
state.SetMaterial(texture, UF_Texture, 0, sprite == nullptr ? (flags & (HWF_CLAMPX | HWF_CLAMPY)) : CLAMP_XY, TRANSLATION(Translation_Remap + curbasepal, palette), -1);
int h = (int)texture->GetDisplayHeight(); int h = (int)texture->GetDisplayHeight();
int h2 = 1 << sizeToBits(h); int h2 = 1 << sizeToBits(h);