46
edits
(Add some information on models, shapes, and materials.) |
(Add partial section order. Meshlet correction.) |
||
Line 1: | Line 1: | ||
A bfres file collects a number of 3d-graphics related resources. This article details bfres version 10.0.0 and 10.2.0. | A bfres file collects a number of 3d-graphics related resources. This article details bfres version 10.0.0 and 10.2.0. | ||
=== File Structure === | |||
Note this omits optional sections not currently found in at least one file. Such as the placement of user data in animations. | |||
==== Section Order ==== | |||
* fres header | |||
* fmdl header array | |||
* fska header array | |||
* fmaa header array | |||
* fvbs header array | |||
* fsha header array | |||
* fscn header array | |||
* memory pool info | |||
* embed file array | |||
* fmdl dictionary | |||
* fska dictionary | |||
* fmaa dictionary | |||
* fvbs dictionary | |||
* fsha dictionary | |||
* fscn dictionary | |||
* embed file dictionary | |||
* fmdl data array: | |||
** fvtx header array | |||
** fmat header array | |||
** reflection header array | |||
** fshp header array | |||
** fskl header | |||
** fskl data: | |||
*** bone header array | |||
*** skin bone index table | |||
*** inverse transform matrix array | |||
*** mirror bone index table | |||
*** bone dictionary | |||
*** bone data array: | |||
**** user data array | |||
**** user data dictionary | |||
**** user data | |||
** shape dictionary | |||
** material dictionary | |||
** fshp data array: | |||
*** mesh array | |||
*** skin bone index array | |||
*** bounding box array | |||
*** bounding sphere array | |||
*** mesh data array: | |||
**** sub mesh array | |||
**** runtime index buffer memory | |||
**** index buffer info | |||
** fvtx data array: | |||
*** vertex attribute array | |||
*** runtime vertex buffer memory array | |||
*** vertex buffer info array | |||
*** vertex buffer stride info array | |||
*** runtime user vertex buffer pointer array | |||
*** vertex attribute dictionary | |||
** fmat data array: | |||
*** render info value string array | |||
*** render info value s32 array | |||
*** render info value float array | |||
*** render info value count array | |||
*** render info value offset array | |||
*** runtime texture view pointer array | |||
*** sampler info array | |||
*** runtime sampler array | |||
*** shader param value array | |||
*** runtime shader param uniform buffer offset array | |||
*** shader param convert flag array | |||
*** user data array | |||
*** runtime sampler descriptor slot array | |||
*** runtime texture view descriptor slot array | |||
*** texture name array | |||
*** static shader variation header | |||
*** static shader variation data: | |||
**** vertex attribute name array | |||
**** vertex attribute variation to reflection array (only if different) | |||
**** vertex attribute reflection to variation array (only if different) | |||
**** sampler name array | |||
**** sampler variation to reflection array (only if different) | |||
**** sampler reflection to variation array (only if different) | |||
**** static shader bool array | |||
**** static shader string array | |||
**** static shader option variation to reflection index array (only if different) | |||
**** static shader option reflection to variation index array (only if different) | |||
*** user data | |||
*** sampler dictionary | |||
*** user data dictionary | |||
** reflection data array: | |||
*** render info array | |||
*** shader param array | |||
*** shader param dictionary (deduplicated between reflections) | |||
*** render info dictionary (deduplicated between reflections) | |||
*** vertex attribute dictionary (deduplicated between reflections) | |||
*** sampler dictionary (deduplicated between reflections) | |||
*** static shader option dictionary (deduplicated between reflections) | |||
* fska data array: | |||
** fast bind table | |||
** bone anim header array | |||
** bone anim data array: | |||
*** default result | |||
*** anim curve header array | |||
*** anim curve frame and value data array | |||
* fvba data array: | |||
** default result array | |||
** fast bind array | |||
** bone name array | |||
** anim curve header array | |||
** anim curve frame and value data array | |||
* fmaa data array: | |||
** fast bind array | |||
** per material anim header array | |||
** runtime texture view descriptor slot array | |||
** runtime texture view pointer array | |||
** texture name array | |||
** per material anim data array: | |||
*** shader param anim array | |||
*** texture pattern anim array | |||
*** constant array | |||
*** anim curve header array | |||
*** anim curve frame and value data array | |||
* fsha data array: | |||
** fast bind table | |||
** vertex shape anim header array | |||
** vertex shape anim data array: | |||
*** key shape anim array | |||
*** anim curve header array | |||
*** default result array | |||
*** anim curve frame and value data array | |||
* fscn data array: | |||
** fcam header array | |||
** flit header array | |||
** ffog header array | |||
** fcam dictionary | |||
** flit dictionary | |||
** ffog dictionary | |||
** fcam data array: | |||
*** anim curve header array | |||
*** default result | |||
*** anim curve frame and value data array | |||
** flit data array: | |||
*** anim curve header array | |||
*** default result | |||
*** anim curve frame and value data array | |||
** ffog data array: | |||
*** anim curve header array | |||
*** default result | |||
*** anim curve frame and value data array | |||
* string pool | |||
* gpu region: | |||
** index buffer data | |||
** vertex buffer data | |||
* runtime memory pool | |||
* embed file region | |||
* relocation table | |||
=== Header (nn::g3d2::ResFile) === | === Header (nn::g3d2::ResFile) === | ||
Line 729: | Line 883: | ||
| | | | ||
|- | |- | ||
| | |0x44 | ||
|0x1 | |0x1 | ||
|u8 | |u8 | ||
|Meshlet buffer count | |Meshlet buffer count | ||
|- | |- | ||
| | |0x45 | ||
|0x3 | |0x3 | ||
|... | |... | ||
Line 1,091: | Line 1,245: | ||
|0x8 | |0x8 | ||
|s32* | |s32* | ||
| | |Runtime shader parameter material uniform buffer offset array | ||
|- | |- | ||
|0x68 | |0x68 |
edits