Skip to content

packing/shader_split: read Phyre shaders from split KIT archives - #1939

Open
JS-banana wants to merge 1 commit into
seedds:mainfrom
JS-banana:fix/kit-phyre-shaders
Open

JS-banana wants to merge 1 commit into
seedds:mainfrom
JS-banana:fix/kit-phyre-shaders

Conversation

@JS-banana

@JS-banana JS-banana commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

What and why

Unravel TWO's shader split finds no programs: its effects are in indexed .kit.N parts with chained LZ4 blocks, and some Phyre compute programs lack the graphics code header.

Read the KIT index and members with bounds, decoded-length and SHA1 checks. Recognize headerless compute programs only inside bounded Phyre effects, while preserving existing graphics rules, reader precedence and archive scan budgets. Nonzero high offset words remain unsupported. The shader entry describes the format and checks.

Validation

Rechecked on upstream main 38521863 (2026-11-13), preserving its GLSLC section-header reader, archive readers and shared-DLC shader-key merge.

  • 117 targeted tests pass: KIT/VBF, Phyre, PG records, Sumo, split progress, every test_split_* suite, docs and environment-switch consistency. This includes a new KIT integration regression: a DLC copy of an effect leaves the game rows unchanged, in either scan order and with or without the DLC.
  • Python lint: 321 baseline findings, zero new. The symptom index is current and git diff --check passes.
  • The headerless Phyre effect fixture still fails against unmodified 38521863; that revision has no KIT reader.
  • regress.py impact upstream/main..HEAD: Breath of the Wild, Pokémon Scarlet and Tears of the Kingdom match the broad shader rule; Hades is not affected; 161 profiles have no usage manifest. No game route or Metal GPU regression was run on this revision. A fresh FINAL FANTASY X/X-2 build remains unchecked. shader_split.py is not a chain-version input.
  • Latest-head CI is pending; previous-head CI results do not validate this revision.

Earlier local repair: Unravel TWO (0100E5D00CC0C000) 1.0.1 yielded 2,629 shaders (438 vertex, 1,793 pixel, 398 compute), all built on the Mac. Two-player gameplay was reported working on November 8. This rebased revision has not been played.

Docs

  • General finding in docs/reference/shaders.md; symptom index regenerated.
  • Synthetic fixtures only. No game files, keys or extracted game data in the change or attachments.

@github-actions github-actions Bot added nvn NVN on Metal and its tests (dm/gfx/nvn, dm/gfx/tests) packing Building an IPA or a Mac app: the NSP script, extraction, the shader split, the packers docs Documentation labels Nov 9, 2026
@JS-banana
JS-banana force-pushed the fix/kit-phyre-shaders branch from a06eb2c to 4504379 Compare November 12, 2026 03:57
Unravel TWO stores its effects in indexed KIT parts with chained LZ4
blocks. Read those members with length and SHA1 checks, then recognize
headerless compute programs within bounded Phyre effects. Keep existing
graphics acceptance rules and archive scan budgets.

Rechecked on main 3852186 with its GLSLC section reader and shared-DLC
shader key merge. A synthetic KIT regression verifies that a repeated
DLC effect leaves the game rows unchanged in either scan order.
117 targeted tests pass. Python lint reports no new findings.
Game routes and Metal GPU regression remain untested on this revision.
@JS-banana
JS-banana force-pushed the fix/kit-phyre-shaders branch from 4504379 to a535695 Compare November 13, 2026 07:16
@JS-banana JS-banana changed the title Read Phyre shaders from split KIT archives packing/shader_split: read Phyre shaders from split KIT archives Nov 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Documentation nvn NVN on Metal and its tests (dm/gfx/nvn, dm/gfx/tests) packing Building an IPA or a Mac app: the NSP script, extraction, the shader split, the packers

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant