Repository navigation
Conversation
JS-banana
force-pushed
the
fix/kit-phyre-shaders
branch
from
November 12, 2026 03:57
a06eb2c to
4504379
Compare
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
force-pushed
the
fix/kit-phyre-shaders
branch
from
November 13, 2026 07:16
4504379 to
a535695
Compare
seedds
added a commit
that referenced
this pull request
Nov 16, 2026
…1939) Unravel TWO's shader split found nothing: its effects are in KIT archives, an index ('kit!') naming hashed members whose data sits in numbered .kit.N parts, compressed as 64 KB LZ4 blocks whose matches reach into the block before. Some of its Phyre effects also hold compute programs without the graphics code header phyre_shaders required. - dm/gfx/tools/kit.py reads the format, beside vbf.py and through romfs like it (the NSP script hands the split a RomFS image): the index and part ranges checked, each block decoded with the previous 64 KB as its dictionary, decoded lengths, complete input use and the member's SHA1 verified, ValueError naming the archive or member otherwise. Nonzero high offset words are rejected. - kit_jobs scans the members in ranges through scan_blob and leaves the parts out of the loose-file scan; a damaged index stops the split, a damaged member leaves its range out with a red line. - phyre_shaders takes the stage from glslc_stage (graphics programs as before); a headerless compute program must lie inside a RYHP effect, fit its bounds and overlap no control section. scan_blob takes Phyre effects and FFX/X-2's loose programs wherever it meets them, and a loose file in either form goes to it: one rule where the loose-file path had its own. Checked: the PR reports 2,629 shaders on Unravel TWO 1.0.1 (438 vertex, 1,793 pixel, 398 compute; zero before), all built on the Mac, and two-player play on an earlier head; neither was rerun here (the game is not on hand). FINAL FANTASY X/X-2 (base and both DLC, 5,752 shaders) and Mario Golf: Super Rush (25,270) split byte-identically to main, tables and red lines, and match their profiles. FINAL FANTASY XII was not run: its tables have no compute rows, so no change is expected. test_kit.py (new) covers the dictionary chaining, raw members, missing and truncated parts, bad lengths and hashes, parts inside a RomFS image, DLC copies leaving the game rows alone and the split's red line; test_vbf.py the Phyre rules; test_pg_shader.py that a binding-table record still reaches its reader. Co-authored-by: Panionk <42017491+JS-banana@users.noreply.github.com>
Owner
|
Landed on main as b4b1c8d, with you as co-author. Thank you: the format work, the reader logic and the tests are yours. Changes on landing:
Checked: FINAL FANTASY X/X-2 (base and both DLC, 5,752 shaders) and Mario Golf: Super Rush (25,270) split byte-identically to main and match their profiles. FFXII wasn't run here (no game files). Not checked: Unravel TWO itself. The game isn't on hand here, so neither the 2,629-shader split nor two-player play was rerun on the landed head. Could you run the NSP script on Unravel TWO 1.0.1 at b4b1c8d and confirm the shader count and a short play session? A profile and game note for Unravel TWO would be welcome as a follow-up PR. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What and why
Unravel TWO's shader split finds no programs: its effects are in indexed
.kit.Nparts 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.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.git diff --checkpasses.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.pyis not a chain-version input.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
docs/reference/shaders.md; symptom index regenerated.