benilla-re systems structs docs

M2TextureUnit

struct · models · 24 bytes

Meaning
Holds a texture unit record of a view: flags, priority, submesh, colour, material, layer and lookup starts
Confidence
verified, proof one
Finding
models/records#texture-unit-record

Finding: Texture unit record in models: records

A texture unit is 0x18 bytes and pairs a submesh with its material and textures.

offsetholds
+0x00flags byte: 4 a special batch when the scene has a special callback, 0x10 may join the grouped list
+0x02priority plane, signed, copied to the element +0x28
+0x04submesh index
+0x08, +0x0acolour index, material index
+0x0clayer: the unit's rank, 0 to n−1, among the view's n units on its submesh (Texture unit layer)
+0x0etexture count, the stage loop bound
+0x10, +0x12first texture lookup, first coordinate lookup
+0x14, +0x16first transparency lookup, first transform lookup

The derivation is in the doc.

Fields 7

offsetsizetypenamemeaningconfidencefinding
0x00001uint8_tm_flagsHolds the flags: 4 a special batch when the scene has a special callback, 0x10 may join the grouped listverified, proof onemodels/records#texture-unit-record
0x00022int16_tm_priorityHolds the priority planeverified, proof onemodels/records#texture-unit-record
0x00042uint16_tm_submeshHolds the submesh indexverified, proof onemodels/records#texture-unit-record
0x00084uint16_t[2]m_colorMaterialHolds the colour index and the material indexverified, proof onemodels/records#texture-unit-record
0x000c2uint16_tm_layerHolds the unit's layer, 0 to n−1 over the view's n units on its submesh: the transparent order's tie keyverified, proof twomodels/records#texture-unit-layer
0x000e2uint16_tm_textureCountHolds the number of texture stagesverified, proof onemodels/records#texture-unit-record
0x00108uint16_t[4]m_lookupsHolds the first texture, coordinate, transparency and transform lookupsverified, proof onemodels/records#texture-unit-record