User:Monster Iestyn/Translucency
Jump to navigation
Jump to search
Main
- Sprite translucency: Console/Variables#translucency; see also State#Attributes
MF2_SHADOW
(see Object flags#Object flags 2)
- Linedef types#Translucent walls
- FOF translucency:
FF_TRANSLUCENT
(e.g Linedef type 102) - PolyObject translucency: Linedef type 491
- HUD translucency: Console/Variables#translucenthud; see also Video flags#Alpha
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:
R_RenderThickSideRange
fromr_segs.c
R_DrawSinglePlane
fromr_plane.c
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
|