CMapObjGroup::FixVertexAlpha
function · models · primitive
- Address
0x6c43d0· 339 bytes, up to0x6c4522- Signature
void __thiscall (CMapObj *this, CMapObjGroup *group)- Meaning
- Fades a group's interior vertex colours toward white and opaque by their distance to outside portals, once
- Confidence
- verified, proof one
- Finding
- models/wmo#portal-vertex-fade
- Test
models::wmo_vertex_fog_blend_difftest
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.
Callers 1
- DrawMapObjectGroup terrain
Callees 1
- MapObjPortalDistance models
Calls and jumps by a bare address, from tables/calls.tsv.