Skip to content

packing/unity: support stripped Unity 2017.2 shaders - #2649

Open
bf39l wants to merge 2 commits into
seedds:mainfrom
bf39l:fix/unity-2017-2
Open

bf39l wants to merge 2 commits into
seedds:mainfrom
bf39l:fix/unity-2017-2

Conversation

@bf39l

@bf39l bf39l commented Nov 14, 2026

Copy link
Copy Markdown

What and why

Mercenaries Wings: The False Phoenix ships stripped Unity 2017.2.1p3 Shader objects. Their type hash was missing from unityfs.py, so the shader reader could not decode them.

Register the hash with an embedded SHADER_2017_2 layout derived from the existing 2017.4 layout. Unity 2017.2 omits m_MultiSampled in TextureParameter and m_StructParams in ConstantBuffer. The existing type-tree loader handles the new layout without an external dump.

Checked

  • Compared the embedded layout with AssetRipper’s Unity 2017.2.1p3 release type tree and the known-good dump-based implementation. All 1,178 nodes matched in type, name, order, and alignment flags.
  • Read all 53 Shader objects to their exact byte boundaries and decoded 456 programs from the packed Mercenaries Wings: The False Phoenix assets (010094500C216000, v0).
  • All 19 Unity unit tests and git diff --check passed.
  • Gameplay and the broader game regression suite were not run. The change adds a layout for one Shader type hash through the existing reader.

Docs

  • No game files, keys or data extracted from a game in the change or the attachments.

Register the Unity 2017.2 Shader hash using the 2017.4 layout with the two later fields removed. Checked all 1,178 nodes and alignment flags against the release type tree, and decoded 53 shaders and 456 programs from Mercenaries Wings.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants