Fox, on 15 December 2014 - 12:32 PM, said:
No, you have one table. For input color indices a and b representing colors A and B, the result of transluc[a][b] is a color index whose color is close to 0.33*A + 0.67*B. Now if you swap the foreground and background inputs, you get: transluc[b][a] = 0.33*B + 0.67*A. This swapping is just what the "reverse translucency bit", 512 for sprites, effects. So the ingenuity with Duke3D's table is that it packs two translucency levels into one table, but intuitively speaking, that's only possible because they're of the same kind.
Edit: an equivalent formulation is saying that, in matrix terms, the transposed table is accessed with the non-swapped indices: translucT[a][b]. So conceptually, there are two tables, but physically, there's only one.
LeoD, on 15 December 2014 - 04:59 PM, said:
Nah, that was mainly addressed to TX. He will know.

Help
Duke4.net
DNF #1
Duke 3D #1






