diff --git a/source/core/rendering/scene/hw_drawstructs.h b/source/core/rendering/scene/hw_drawstructs.h index fc3809c56..c7713143e 100644 --- a/source/core/rendering/scene/hw_drawstructs.h +++ b/source/core/rendering/scene/hw_drawstructs.h @@ -405,7 +405,12 @@ __forceinline void SetLightAndFog(FRenderState& state, PalEntry fade, int palett // Fog must be done before the texture so that the texture selector can override it. bool foggy = (GlobalMapFog || (fade & 0xffffff)); auto ShadeDiv = lookups.tables[palette].ShadeFactor; + bool shadow = orgshade >= numshades; int shade = clamp(orgshade, 0, numshades - 1); + + if (shadow) state.SetObjectColor(0xff000000); + else state.SetObjectColor(0xffffffff); + // Disable brightmaps if non-black fog is used. if (ShadeDiv >= 1 / 1000.f && foggy) { diff --git a/source/core/rendering/scene/hw_sprites.cpp b/source/core/rendering/scene/hw_sprites.cpp index 35af8f331..221b1c0f9 100644 --- a/source/core/rendering/scene/hw_sprites.cpp +++ b/source/core/rendering/scene/hw_sprites.cpp @@ -109,15 +109,6 @@ void HWSprite::DrawSprite(HWDrawInfo* di, FRenderState& state, bool translucent) else RenderStyle.BlendOp = STYLEOP_Fuzz; // subtractive with models is not going to work. } - // Fog must be done before the texture so that the texture selector can override it. - // Disable brightmaps if non-black fog is used. - int shade = this->shade; - if (this->shade > numshades) // handling of SW's shadow hack using a shade of 127. - { - shade = sector[sprite->sectnum].floorshade; - state.SetColor(0, 0, 0, alpha); - } - SetLightAndFog(state, fade, palette, shade, visibility, alpha, this->shade <= numshades); if (modelframe == 0)