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.
| offset | holds |
|---|---|
+0x00 | flags byte: 4 a special batch when the scene has a special callback, 0x10 may join the grouped list |
+0x02 | priority plane, signed, copied to the element +0x28 |
+0x04 | submesh index |
+0x08, +0x0a | colour index, material index |
+0x0c | layer: the unit's rank, 0 to n−1, among the view's n units on its submesh (Texture unit layer) |
+0x0e | texture count, the stage loop bound |
+0x10, +0x12 | first texture lookup, first coordinate lookup |
+0x14, +0x16 | first transparency lookup, first transform lookup |
The derivation is in the doc.
Fields 7
| offset | size | type | name | meaning | confidence | finding |
|---|---|---|---|---|---|---|
0x0000 | 1 | uint8_t | m_flags | Holds the flags: 4 a special batch when the scene has a special callback, 0x10 may join the grouped list | verified, proof one | models/records#texture-unit-record |
0x0002 | 2 | int16_t | m_priority | Holds the priority plane | verified, proof one | models/records#texture-unit-record |
0x0004 | 2 | uint16_t | m_submesh | Holds the submesh index | verified, proof one | models/records#texture-unit-record |
0x0008 | 4 | uint16_t[2] | m_colorMaterial | Holds the colour index and the material index | verified, proof one | models/records#texture-unit-record |
0x000c | 2 | uint16_t | m_layer | Holds the unit's layer, 0 to n−1 over the view's n units on its submesh: the transparent order's tie key | verified, proof two | models/records#texture-unit-layer |
0x000e | 2 | uint16_t | m_textureCount | Holds the number of texture stages | verified, proof one | models/records#texture-unit-record |
0x0010 | 8 | uint16_t[4] | m_lookups | Holds the first texture, coordinate, transparency and transform lookups | verified, proof one | models/records#texture-unit-record |