- adjusted GL renderer to the new rules for alpha textures. This means that the translation fallback is only needed for the legacy renderer now. Modern GL can use the regular texture and will apply a grayscale mapping instead of merely using the red channel.

This commit is contained in:
Christoph Oelckers 2018-03-22 20:42:17 +01:00
commit d586d774cf
4 changed files with 9 additions and 11 deletions

View file

@ -91,7 +91,9 @@ void F2DDrawer::AddTexture(FTexture *img, DrawParms &parms)
if (!img->bHasCanvas)
{
if (!parms.alphaChannel)
dg.mAlphaTexture = !!(parms.style.Flags & STYLEF_RedIsAlpha);
if (!dg.mAlphaTexture)
{
if (parms.remap != NULL && !parms.remap->Inactive)
{
@ -99,7 +101,6 @@ void F2DDrawer::AddTexture(FTexture *img, DrawParms &parms)
if (pal) dg.mTranslation = -pal->GetIndex();
}
}
dg.mAlphaTexture = !!(parms.style.Flags & STYLEF_RedIsAlpha);
u1 = gltex->GetUL();
v1 = gltex->GetVT();
u2 = gltex->GetUR();