EFTB
EFTB
files define certain graphical effects of objects such as emissions, particles, and shaders.
EFTB File Layout
EFTB files are made up of a header and four arrays that are aligned to 16 bytes.
- Emitter Set Array
- Texture Array
- PRM[check] Array
- Shader Array
Each array serves as a root node in a tree structure.
EFTB Header
EFTB's header is 48 bytes and is not yet well-understood.
Header Structure
Offset (h) | Size | Data Type | Description |
---|---|---|---|
0x00 | 4 | String | file signature (magic) (45 46 54 42 or "EFTB")
|
0x04 | 4 | Unsigned Int | Unknown (00 00 00 14 )
|
0x08 | 4 | String | Unknown (47 61 6d 65 or "Game")
|
... |
Nodes
Each node in an array's tree structure is made up of a header and three optional sections.
- Binary data
- Child nodes
- Attribute nodes[check]
Node Header Structure
Node headers typically have the same 32-byte structure, though some are longer and some calculate certain values differently.
Offset (h) | Size | Data Type | Description |
---|---|---|---|
0x00 | 4 | Unsigned Int | Signature (magic) |
0x04 | 4 | Unsigned Int | Node size. Different node types calculate this differently. |
0x08 | 4 | Unsigned Int | Offset to the first child node, or FF FF FF FF if there are no children
|
0x0c | 4 | Unsigned Int | Offset to the next sibling node, or FF FF FF FF if there are no more siblings
|
0x10 | 4 | Unsigned Int | Offset to the first attribute[check], or FF FF FF FF if there are no attributes
|
0x14 | 4 | Unsigned Int | Offset to the binary data, or the size of the header |
0x18 | 4 | Padding | |
0x1c | 2 | Unsigned Short | Number of child nodes. Shaders' use of this value is unknown. |
0x1e | 2 | Unsigned Short | Unknown (00 01 )
|
Emitter Sets (ESTA)
The Emitter Set Array (ESTA) contains any number of Emitter Sets (ESET), with each set containing any number of Emitters (EMTR). Emitters cause an object to cast light on surrounding surfaces. Emitters can also have any number of attribute nodes (e.g. CADP, CSDP, FCSF), the purpose of which is currently unknown.
Textures (TEXA)
The Texture Array (TEXA) contains any number of Textures (TEXR), with each texture containing a single[check] GX2 Texture Block (GX2B).
(PRMA)
Shaders (SHDA)
The Shader Array (SHDA) contains a single[check] GX2 Shader Block (SHDB).