OpenGL Flashpal Flashes

Fixed flashes for OpenGL Nukes/Teleports etc.
This commit is contained in:
Sryder13 2014-03-23 00:04:35 +00:00
parent 9386b3900b
commit 734d6b56f0

View file

@ -5231,11 +5231,19 @@ void HWR_DoPostProcessor(player_t *player)
FOutVector v[4];
FSurfaceInfo Surf;
v[0].x = v[2].y = v[3].x = v[3].y = -1.0f;
v[0].y = v[1].x = v[1].y = v[2].x = 1.0f;
v[0].z = v[1].z = v[2].z = v[3].z = 1.0f;
v[0].x = v[2].y = v[3].x = v[3].y = -4.0f;
v[0].y = v[1].x = v[1].y = v[2].x = 4.0f;
v[0].z = v[1].z = v[2].z = v[3].z = 4.0f; // 4.0 because of the same reason as with the sky, just after the screen is cleared so near clipping plane is 3.99
// This won't change if the flash palettes are changed unfortunately, but it works for its purpose
if (player->flashpal == PAL_NUKE)
{
Surf.FlatColor.s.red = 0xff;
Surf.FlatColor.s.green = Surf.FlatColor.s.blue = 0x7F; // The nuke palette is kind of pink-ish
}
else
Surf.FlatColor.s.red = Surf.FlatColor.s.green = Surf.FlatColor.s.blue = 0xff;
Surf.FlatColor.s.alpha = 0xc0; // match software mode
HWD.pfnDrawPolygon(&Surf, v, 4, PF_Modulated|PF_Additive|PF_NoTexture|PF_NoDepthTest|PF_Clip|PF_NoZClip);