FillShadowTexture
function · terrain · orchestration
- Address
0x6b1180· 44 bytes, up to0x6b11ab- Signature
void __fastcall (uint32_t request, uint32_t width, uint32_t, uint32_t, CMapChunk *chunk, uint32_t *pitch, void **data, uint32_t arg8)- Meaning
- Fills a chunk's shadow texture on request 1 from its decoded shadow map
- Confidence
- verified, proof one
- Finding
- terrain/chunk#shadow-maps
Finding: Shadow maps in terrain: chunk
On the fixed-function path, a chunk with a shadow map gets its own texture (+0x140), sized as an
alpha texture. The map is 512 bytes of bits, least significant first, decoded to the texels 0x0000
for a clear bit and 0xffff for a set one, 64×64 with shadowLevel 0 and otherwise 32×32 on the
0, 2, …, 60, 63 samples; the texture is 32 square only when the value is exactly 1. The MCNK flag bit 15 does not change the shadow walk.
The derivation is in the doc.
Callers 0
None by a direct call or jump.
Callees 1
- CMapChunk::DecodeShadow terrain
Calls and jumps by a bare address, from tables/calls.tsv.