s_keepMapObjVertexAlpha
global · models
- Address
0xca8064· 1 bytes, up to0xca8064- Type
uint8_t- Meaning
- Holds the switch that leaves the colour alphas of a group's opaque faces as read
- Confidence
- inferred
- Finding
- models/wmo#portal-vertex-fade
Finding: Portal vertex fade in models: map objects
When a group's MOCV colours are read, every vertex of a face whose MOPY flags lack bit 0 gets
alpha 0xff, unless a global switch is set. On the group's first draw, each vertex up to the
highest vertex of the batches its first batch count covers is faded toward the outside: d is its least distance to a portal
of the group that leads to a group with flags 0x8 or 0x40. At d = 0 the colour becomes
0xffffffff; for 0 < d < 6.666667 with alpha 0, with t = 1 − 0.15·d, each of r, g, b becomes
c + (255 − c)·t and alpha 255·t, each byte taken as (x + 512) >> 14.
The derivation is in the doc.