benilla-re systems structs docs

s_shadowColor

global · terrain

Address
0xc6328c · 4 bytes, up to 0xc6328f
Type
uint32_t
Meaning
Holds the shadow colour of the shadow pass and query; the world frame rewrites it from the light state each frame
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.