benilla-re systems structs docs

s_m2AlphaRefScale

global · models

Address
0x812034 · 4 bytes, up to 0x812037
Type
float
Meaning
Holds 224.0, the alpha test reference of an alpha-keyed batch at full alpha
Confidence
verified, proof one
Finding
models/render#material-state

Finding: Material state in models: drawing

statevalue
colour write mask0 for a depth-only element, else 0xf
blendthe table 0x811fe0 at 7k + blend; for a depth-only element, 1 when blend is 1
alpha referenceblend 0: 0; blend 1: ftol(alpha · 224.0); otherwise 1
cullon unless material flag 4
depth teston unless material flag 8 or instance flag 2
depth writeon unless material flag 0x10 or instance flag 2
normalizeset only without vertex shaders and for kinds other than 2: off when row 0 of a one-bone submesh's bone matrix, or for a kind above 2 of the instance's world matrix, has `

The blend table holds 0, 1, 2, 10, 3, 4, 5 for list 0 and 2, 2, 2, 10, 3, 4, 5 for lists 1 and 2. Blend 5 draws with diffuse 0 and emissive 1, blend 6 with emissive 0.5; other blends use the instance diffuse times the colour animation and the instance emissive, and an unlit material adds the diffuse into the emissive and zeroes the diffuse.

The derivation is in the doc.