Skip to content

packing/split: FromSoftware's shaderbnd archives, Kraken shader bundles (DM_OOZ) and NVN2 shaders embedded in a code module - #2614

Open
FifteenPen wants to merge 3 commits into
seedds:mainfrom
FifteenPen:pr/split-fromsoftware-nvn2
Open

FifteenPen wants to merge 3 commits into
seedds:mainfrom
FifteenPen:pr/split-fromsoftware-nvn2

Conversation

@FifteenPen

Copy link
Copy Markdown
Contributor

Three shader_split readers, found on The Duskbloods network test (0400D1D02399A000, FromSoftware's engine, NVN2):

  • shaderbnd: romfs/shader/*.shaderbnd.dcx is DCX (zlib) wrapping BND4 archives of CGSB entries that hold NVN2 shaders.
  • Kraken bundles: shaderbdle.shaderbdlebnd.dcx is DCX compressed with Oodle Kraken (492 BND4 archives, the per-material world shaders). Kraken goes through an external decoder named by DM_OOZ (github.com/powzix/ooz, GPL-3.0, kept out of the repository). Without it the reader reports what it needs and skips the file. Both switches are in docs/env_switches.tsv.
  • NVN2 shaders embedded in a code module: the Bink 2 movie shaders sit in main as a code area next to an NVN2 control section. The vertex/pixel pair keeps its code before the control and the compute shaders keep theirs after it, so the reader takes whichever side is dense code that checks out. Without this, the opening movie was black with audio. Covered by test_split_nvn2_embedded.py.

The game's tables come in the profile PR.

…B) for The Duskbloods' NVN2 shaders

romfs/shader/*.shaderbnd.dcx: a zlib DCX around a BND4 archive (formats 0x74 and 0x54, 0x24-byte entries, UTF-16 names) whose members are CGSB blobs, each an NVN record with the code area and the NVN2 control section of one shader (.vpo .ppo .cpo .gpo .hpo .dpo .mpo .apo). scan_blob unwraps DCX and BND4 and reads CGSB; a DCX of another method (the game's KRAK geometry) that reaches it by a chance byte match is skipped. The file filter takes .shaderbnd.dcx. The Duskbloods' profile tables, split again: 1,957 shaders (1,945 of them from the archives).
@github-actions github-actions Bot added packing Building an IPA or a Mac app: the NSP script, extraction, the shader split, the packers tools Tools and scripts (dm/tools, scripts) docs Documentation labels Nov 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Documentation packing Building an IPA or a Mac app: the NSP script, extraction, the shader split, the packers tools Tools and scripts (dm/tools, scripts)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant