EFTB: Difference between revisions

From ZeldaMods (Breath of the Wild)
Jump to navigation Jump to search
imported>Locke
(Created page with "<onlyinclude> <code>EFTB</code> files define certain graphical effects of objects such as emissions, particles, and shaders. </onlyinclude> == EFTB File Layout == EFTB files...")
 
(Replaced content with "<onlyinclude> <code>EFTB</code> files are PTCL files. </onlyinclude> Category:File formats")
Tag: Replaced
 
(6 intermediate revisions by one other user not shown)
Line 1: Line 1:
<onlyinclude>
<onlyinclude>
<code>EFTB</code> files define certain graphical effects of objects such as emissions, particles, and shaders.
<code>EFTB</code> files are [[PTCL]] files.
</onlyinclude>
</onlyinclude>
== 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 ===
{| class="wikitable"
!Offset (h)
!Size
!Data Type
!Description
|-
| 0x00
| 4
| String
| file signature (magic) (<code>45 46 54 42</code> or "EFTB")
|-
| 0x04
| 4
| Unsigned Int
| Unknown (<code>00 00 00 14</code>)
|-
| 0x08
| 4
| String
| Unknown (<code>47 61 6d 65</code> or "Game")
|-
| colspan="4" | ...
|}
== 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.
{| class="wikitable"
!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 <code>FF FF FF FF</code> if there are no children
|-
| 0x0c
| 4
| Unsigned Int
| Offset to the next sibling node, or <code>FF FF FF FF</code> if there are no more siblings
|-
| 0x10
| 4
| Unsigned Int
| Offset to the first attribute{{check}}, or <code>FF FF FF FF</code> 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 (<code>00 01</code>)
|}
=== 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).
<references />


[[Category:File formats]]
[[Category:File formats]]

Latest revision as of 01:35, 26 January 2022

EFTB files are PTCL files.