User:Monster Iestyn/Translucency

From SRB2 Wiki
Jump to: navigation, search
Test.png This article or section is incomplete. It doesn't have all of the necessary core information on this topic. Please help the SRB2 Wiki by finishing this article.

Main

Alpha values

In software mode, SRB2 sometimes has to convert from an 8-bit "alpha" value to an approximate transmap. In OpenGL the reverse often occurs instead.

Translucent FOF alpha to transmap conversion table

Source:

Alpha values Transmap
#000-#011 Invisible
#012-#037 tr_trans90
#038-#063 tr_trans80
#064-#088 tr_trans70
#089-#114 tr_trans60
#115-#139 tr_trans50
#140-#165 tr_trans40
#166-#191 tr_trans30
#192-#216 tr_trans20
#217-#242 tr_trans10
#243-#255 Opaque (turns cyan pixels on flats transparent)

OpenGL transmap to alpha conversion table

Source: HWR_TranstableToAlpha from hw_main.c

Transmap Alpha (Decimal) Alpha (Hexadecimal)
tr_trans10 230 0xe6
tr_trans20 204 0xcc
tr_trans30 179 0xb3
tr_trans40 153 0x99
tr_trans50 128 0x80
tr_trans60 102 0x66
tr_trans70 76 0x4c
tr_trans80 51 0x33
tr_trans90 25 0x19