Enhanced drawables and fragments
A drawable combines geometry, shader references, bounding volumes and an optional skeleton. A YDR holds one drawable; a YDD holds drawables keyed by name hash; a YFT fragment holds a main drawable, additional drawables and physics data. Enhanced uses resource versions 159 for YDR/YDD and 171 for YFT. Proven
The structural census reads every copy with these versions: 84,592 YDRs, 23,108 YDDs and 61,064 YFTs, with no structural failures. Fifteen YDR copies use other layouts (12 version 154 and three version 165) and are excluded from these layout claims. Stored-field proofs below cover the accepted versions; they do not establish the excluded layouts or every runtime use of a field. Proven · version-filtered full-install census
CodeWalker reads version 154 and 159 YDR and YDD files with the Gen9 layout and version 165 with the Legacy layout, whatever the install. Sourced · CodeWalker
Drawable and models
Section titled “Drawable and models”Four model-list pointers describe high, medium, low and very-low detail. These lists are inside an asset, separate from the world’s placement LOD hierarchy. Proven
| Offset | Size | Type | Field | Confidence | Notes |
|---|---|---|---|---|---|
| 0x0 | 16 | bytes | resource base | Sourced | |
| 0x10 | 8 | pointer | shader group | Proven | |
| 0x18 | 8 | pointer | skeleton | Proven | |
| 0x20 | 12 | vec3 | bounding sphere centre | Proven | |
| 0x2C | 4 | f32 | bounding sphere radius | Proven | |
| 0x30 | 16 | vec4 | box minimum | Proven | |
| 0x40 | 16 | vec4 | box maximum | Proven | |
| 0x50 | 32 | pointer[4] | LOD model lists | Proven | |
| 0x70 | 16 | f32[4] | LOD distances | Proven | |
| 0x80 | 16 | u32[4] | render masks | Proven | |
| 0x90 | 8 | pointer | joints | Sourced | |
| 0x98 | 8 | bytes | unknown | Unknown | |
| 0xA0 | 8 | pointer | models block | Sourced |
| Offset | Size | Type | Field | Confidence | Notes |
|---|---|---|---|---|---|
| 0x0 | 8 | bytes | unknown | Unknown | |
| 0x8 | 8 | pointer | geometry pointer array | Proven | |
| 0x10 | 2 | u16 | geometry count | Proven | |
| 0x12 | 2 | u16 | repeated geometry count | Proven | |
| 0x14 | 4 | bytes | unknown | Unknown | |
| 0x18 | 8 | pointer | bounding boxes | Proven | |
| 0x20 | 8 | pointer | shader indices per geometry | Proven | |
| 0x28 | 4 | u32 | skeleton binding | Proven | |
| 0x2C | 2 | u16 | render mask | Proven | |
| 0x2E | 2 | bytes | unknown tail | Unknown |
A model with several geometries has a whole-model box followed by geometry boxes; a single geometry uses one box. Each geometry has its own vertex and index buffers and selects a shader through the model’s shader-index array. Proven
The sampled normal drawing path uses model render-mask bit 0. Models without that bit are other-pass proxies; the complete meaning of every mask bit is not established. Observed CodeWalker builds byte 1 of each LOD’s render mask as the OR of the low bytes of its models’ masks, and hides a model whose mask bit 0 is clear unless proxies are asked for; the FiveM headers say the model’s byte is tested against the upper byte of the shader’s draw-bucket mask. Sourced · CodeWalker, FiveM rage-formats-x CodeWalker draws a fragment as its main drawable, its cloth drawable and both drawables of every child of physics LOD 1. Sourced · CodeWalker
Enhanced vertices
Section titled “Enhanced vertices”The Enhanced declaration is 320 bytes, with 52 semantic slots. Each present slot supplies a byte offset, stride and one-byte SGA buffer-format code. Format zero marks an absent slot. Vertices are interleaved in offset order. Proven
| Offset | Size | Type | Field | Confidence | Notes |
|---|---|---|---|---|---|
| 0x0 | 208 | u32[52] | byte offsets by semantic slot | Proven | |
| 0xD0 | 52 | u8[52] | strides by semantic slot | Proven | |
| 0x104 | 52 | u8[52] | buffer formats by semantic slot | Proven | |
| 0x138 | 8 | u64 | packed declaration word | Proven | bits 2–9 repeat stride; other bit meanings are not all established |
| Slot range | Semantics | Confidence |
|---|---|---|
| 0–3 | POSITION0–POSITION3 |
Proven |
| 4–7 | NORMAL0–NORMAL3 |
Proven |
| 8–11 | TANGENT0–TANGENT3 |
Proven |
| 12–15 | BINORMAL0–BINORMAL3 |
Proven |
| 16–19 | BLENDWEIGHT0–BLENDWEIGHT3 |
Proven |
| 20–23 | BLENDINDICES0–BLENDINDICES3 |
Proven |
| 24–27 | COLOR0–COLOR3 |
Proven |
| 28–51 | TEXCOORD0–TEXCOORD23 |
Proven |
Indices are 16-bit triangle lists in the inspected Enhanced layout. Proven
| Offset | Size | Type | Field | Confidence | Notes |
|---|---|---|---|---|---|
| 0x0 | 24 | bytes | unknown prefix | Unknown | |
| 0x18 | 8 | pointer | vertex buffer | Proven | |
| 0x20 | 24 | bytes | unknown | Unknown | |
| 0x38 | 8 | pointer | index buffer | Proven | |
| 0x40 | 24 | bytes | unknown | Unknown | |
| 0x58 | 4 | u32 | index count | Proven | |
| 0x5C | 4 | u32 | triangle count | Proven | |
| 0x60 | 2 | u16 | low 16 bits of vertex count | Proven | |
| 0x62 | 2 | u16 | unknown constant | Unknown | 3 in inspected layout |
| 0x64 | 4 | bytes | unknown | Unknown | |
| 0x68 | 8 | pointer | bone palette | Proven | |
| 0x70 | 2 | u16 | vertex stride | Proven | |
| 0x72 | 2 | u16 | bone palette count | Proven | |
| 0x74 | 36 | bytes | remaining fields | Unknown |
| Offset | Size | Type | Field | Confidence | Notes |
|---|---|---|---|---|---|
| 0x0 | 8 | bytes | unknown prefix | Unknown | |
| 0x8 | 4 | u32 | vertex count | Proven | |
| 0xC | 2 | u16 | stride | Proven | |
| 0xE | 10 | bytes | unknown | Unknown | |
| 0x18 | 8 | pointer | vertex data | Proven | |
| 0x20 | 24 | bytes | unknown | Unknown | |
| 0x38 | 8 | pointer | declaration | Proven |
| Offset | Size | Type | Field | Confidence | Notes |
|---|---|---|---|---|---|
| 0x0 | 8 | bytes | unknown prefix | Unknown | |
| 0x8 | 4 | u32 | index count | Proven | |
| 0xC | 2 | u16 | index size | Proven | 2 in inspected layout |
| 0xE | 10 | bytes | unknown | Unknown | |
| 0x18 | 8 | pointer | index data | Proven | |
| 0x20 | 32 | bytes | unknown tail | Unknown |
The format byte shares its code space with Enhanced textures; it is not a direct DXGI enum cast. Vertex-colour roles depend on the shader. Proven
Tangent frames
Section titled “Tangent frames”A tangent’s fourth component w is the handedness sign: the bitangent is cross(T, N) × w, and a normal map’s red
channel runs along T and its green channel along that bitangent. Observed[against CodeWalker’s reading of the same
vertices] Measured over the triangles of dt1_23_build2.ydr, this stored frame equals the frame derived from
TEXCOORD0 with the bitangent pointing along +v on 98.5% of the surface area (2,578 of 2,616 m²); 1.1% of the area has
degenerate UVs and 0.3% is mirrored. Observed · one drawable
Fragments and data exceptions
Section titled “Fragments and data exceptions”A fragment’s extra drawable can have no shader group and inherit the main drawable’s shaders. Its first physics LOD can carry embedded collision. Proven
| Offset | Size | Type | Field | Confidence | Notes |
|---|---|---|---|---|---|
| 0x0 | 16 | bytes | resource base | Sourced | |
| 0x10 | 16 | bytes | unknown | Unknown | |
| 0x20 | 16 | vec4 | bounding sphere | Sourced | |
| 0x30 | 8 | pointer | main drawable | Proven | |
| 0x38 | 8 | pointer | extra drawable pointers | Proven | |
| 0x40 | 8 | pointer | extra drawable name pointers | Proven | |
| 0x48 | 4 | u32 | extra drawable count | Proven | |
| 0x4C | 12 | bytes | unknown | Unknown | |
| 0x58 | 8 | pointer | fragment name | Proven | |
| 0x60 | 72 | bytes | unknown | Unknown | |
| 0xA8 | 8 | pointer | bone pose | Proven | |
| 0xB0 | 64 | bytes | unknown | Unknown | |
| 0xF0 | 8 | pointer | physics LOD group | Proven | |
| 0xF8 | 8 | pointer | cloth drawable | Proven | |
| 0x100 | 16 | bytes | unknown | Unknown | |
| 0x110 | 16 | list | light list | Proven | |
| 0x120 | 16 | bytes | unknown tail | Unknown |
prop_gascyl_02b.yft stores NaN tangent components in 16 of its 634 high-detail vertices. A finite position stream
does not establish that every auxiliary stream is finite. Observed
Their stored locations are known; the interpretation above covers only the fields consumed by the inspected layout.
Unknown
CodeWalker’s Gen9 declaration and the FiveM RDR3 sgaInputLayout declare the packed word’s low 32 bits as hasSOA
(bit 0), a flag (bit 1), the vertex size (bits 2–9) and the vertex count (bits 10–31). Whether the stock Enhanced
files fill the count bits has not been checked against the data. Sourced · CodeWalker, FiveM rage-formats-x