s_detailTranslateScale
global · terrain
- Address
0x810c68· 4 bytes, up to0x810c6b- Type
float- Meaning
- Holds -0.75, the factor of the detail doodad distance in the ramp's translation
- Confidence
- verified, proof one
- Finding
- terrain/detail#detail-doodad-draw
Finding: Detail doodad draw in terrain: detail doodads
0x6b2b80 draws a chunk's batch. It sets stage 0 combine 1 (modulate), culling off, device colour
white, blend 2, the alpha reference to the byte 0xc7b2fc (128 at start-up), depth write on and
the ramp on stage 1 with combine 1, camera-space texture coordinates (state 0x30 = 3) and its
texture matrix on (state 0x38 = 1). The stage 1 matrix makes u = (z − 52.5)/17.5 and v = y/17.5
of the eye-space position: scale 1/(70 × 0.25), rotate π/2 about y, translate (0, 0, 70 ×
−0.75). Each slot with data is uploaded and drawn with its model's texture on stage 0. Culling
and depth write are set to 1 at the end.
The derivation is in the doc.