s_layerSpeedDivisors
global · terrain
- Address
0x86c318· 32 bytes, up to0x86c337- Type
float[8]- Meaning
- Holds the divisors 64, 48, 32, 16, 8, 4, 2, 1 an animated layer's scroll is scaled by
- Confidence
- verified, proof one
- Finding
- terrain/render#chunk-layer-states
Finding: Chunk layer states in terrain: render
Each layer sets its own states between the passes. A null texture is skipped. Flag bit 7 turns lighting
off for the layer. Flag bit 6 marks an animated layer: the direction is the record of 0xc5a480 at 16
bytes times (flags & 7), the speed divisor is 0x86c318[(flags >> 3) & 7] (64, 48, 32, 16, 8, 4, 2, 1),
and the stage 0 matrix is pushed again, translated by the record's three floats times −sy over the
divisor. A program takes the layer's constants and blends 0 for the first layer, 2 after; without one,
a layer with an alpha texture +0x14 blends 2 with preset 1 and stage 1 set to it, else 0.
The derivation is in the doc.