- changed the handling of alpha textures. The only special case they need is with palette-less textures and this can be handled far more easily and robustly with a predefined translation instead of passing another parameter through all the layers of the texture management code. This also fixes problems with paletted PNGs that get used as an alpha texture because the old method clobbered the image's palette.
This commit is contained in:
parent
4bb320a27c
commit
acf6c259d8
12 changed files with 75 additions and 93 deletions
|
|
@ -824,6 +824,15 @@ void R_InitTranslationTables ()
|
|||
remap->Remap[i] = IcePaletteRemap[v];
|
||||
remap->Palette[i] = PalEntry(255, IcePalette[v][0], IcePalette[v][1], IcePalette[v][2]);
|
||||
}
|
||||
|
||||
// The alphatexture translation. Since alphatextures use the red channel this is just a standard grayscale mapping.
|
||||
PushIdentityTable(TRANSLATION_Standard);
|
||||
remap = translationtables[TRANSLATION_Standard][8];
|
||||
for (i = 0; i < 256; i++)
|
||||
{
|
||||
remap->Remap[i] = i;
|
||||
remap->Palette[i] = PalEntry(255, i, i, i);
|
||||
}
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue