TINTTAB

From DoomWiki.org

Revision as of 08:06, 6 August 2022 by Quasar (talk | contribs) (Reversibility)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

TINTTAB is a WAD lump in Heretic and Hexen for supporting translucency in objects, supplanting the partial invisibility effect used in Doom and Doom II.

It is a precalculated lookup table similar to COLORMAP, but maps each color against each other color, rather than against specific luminosity levels. It is 65536 bytes (256×256) and determines what each translucent foreground color changes to when shown in front of another color. Due to the limitation of 256 colors shown on screen at once, it is only an approximation in most cases - the ideal color is swapped for the closest color available in the palette through a process known as quantization.

A similar lump exists in Strife with the name XLATAB, though it was calculated using a slightly different algorithm which ensures that any foreground color will eventually fade to the background color if the blending lookup is performed repeatedly.

It is possible to index the table in the opposite direction than usual by reversing the background and foreground colors. This allows two different translucency levels to be derived from the same lookup table. In Strife, this is used to allow for both 75% foreground/25% background translucency and 25% foreground/75% background translucency.

Gallery[edit]

See also[edit]