MapObjPortalDistance
function · models · orchestration
- Address
0x6c4340· 130 bytes, up to0x6c43c1- Signature
float __thiscall (CMapObj *this, CMapObjGroup *group, const NTempest::C3Vector *point)- Meaning
- Returns a point's least distance to the group's portals that lead to exterior groups
- 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
- CMapObjGroup::FixVertexAlpha models
Callees 1
- MapObjPortalPointDistance models
Calls and jumps by a bare address, from tables/calls.tsv.