benilla-re systems structs docs

s_shadowBaseTexture

global · terrain

Address
0xc6319c · 4 bytes, up to 0xc6319f
Type
void *
Meaning
Holds the texture the shadow pass binds on stage 0
Confidence
verified, proof one
Finding
terrain/render#chunk-layers-in-multipass

Finding: Chunk layers in multipass in terrain: render

On the multipass path the chunk draws opaque with the first layer and alpha blended after it, one pass a layer. Each layer's texture is stage 0; a later layer's alpha map is stage 1 with the combine preset 1. Both stages generate their coordinates from the vertex position (mode 2) through a texture matrix that scales by −1/sy and moves by the negated offset of the chunk from the camera; stage 1 scales by a further −0.125. The shadow comes after the layers as one more pass.

The derivation is in the doc.