- fixed sky rendering in palette emulation mode.

The sky dome drawer cannot work with indexed textures, but since they are fullbright anyway we can just temporarily disable it.
This commit is contained in:
Christoph Oelckers 2021-04-05 21:53:19 +02:00
parent 30c7dbd579
commit 16ad5f0cc8

View file

@ -34,6 +34,8 @@
//-----------------------------------------------------------------------------
void HWSkyPortal::DrawContents(HWDrawInfo *di, FRenderState &state)
{
int indexed = hw_int_useindexedcolortextures;
hw_int_useindexedcolortextures = false; // this code does not work with indexed textures.
bool drawBoth = false;
auto &vp = di->Viewpoint;
@ -101,6 +103,7 @@ void HWSkyPortal::DrawContents(HWDrawInfo *di, FRenderState &state)
//di->lightmode = oldlightmode;
state.SetDepthClamp(oldClamp);
}
hw_int_useindexedcolortextures = indexed;
}
const char *HWSkyPortal::GetName() { return "Sky"; }