benilla-re systems structs docs

s_m2DeviceBlendByList

global · models

Address
0x811fe0 · 84 bytes, up to 0x812033
Type
uint32_t[21]
Meaning
Holds the device blend of each blend mode for each of the three lists
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.