Repository navigation
unityfs: Unity 6000.3 Shader and ComputeShader layouts for stripped player files - #791
gnosticgeek wants to merge 1 commit into
Conversation
…layer files Castlevania: Belmont's Curse (01005F4027E94000 cartridge, game 0100BA4026E94000, Unity 6000.3) keeps all 97 Shaders and 11 ComputeShaders in player files without type trees, and none of its 368 Addressables bundles holds a Shader. The split stopped at the built-in resources with "no bundle has a Shader type tree of the same hash to borrow". Shader version 4 (6000.3.0f1 and later) adds m_AssetLocalIdentifierInFile after m_AssetGUID, and each ComputeShader resource gains a resType after its texture dimension. Both layouts match AssetRipper's 6000.3 release dumps node for node, the alignment flags included. Every stripped object reads to its exact end, and the split gives 2,165 stage shaders; headless runs reach its title menu and the New Game intro on an M4 Pro Mac. Both hashes are in KNOWN_TREES and test_unity_known_trees.py, and test_unity_compute.py reads a 6000.3 ComputeShader fixture through to shader_split. The entry is in docs/reference/shaders.md. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…p GPU skinning (#857) Hello Kitty Party Land (Unity 6000.3.11f1) drew its characters as huge stretched triangles. Its ComputeShader objects (class 72, type hash 43a0948a...) have no type tree from a bundle and no layout in unityfs.py, so the split left out their kernels, Unity's built-in Internal-Skinning among them. The run then logged "the dispatched program has no compute shader" and the characters drew from vertex buffers nothing wrote. COMPUTE_6000_3 is the 2022.3 layout with an int resType after each resource's texDimension and threadGroupSize a staticvector again. It is keyed by type hash and used only for stripped files no bundle lends a tree to. All 159 nodes and alignment flags match AssetRipper's 6000.3.0b4, 6000.3.0f1, 6000.3.11f1 and 6000.3.20f1 dumps, compared here. PR #857 and PR #791 report the same hash on different games; those game results were not repeated here, since no game with this hash is available. The fixture from PR #791 reads to its exact end and into the split, and fails with the 2022.3 layout. Silver Pines (6000.3.15f1) already has these kernels in its table without this layout. PR #791's Shader layout is left out: its hash is not confirmed. Co-authored-by: James <12531452+capibawa@users.noreply.github.com> Co-authored-by: Tom Ramsden <13732780+gnosticgeek@users.noreply.github.com>
|
The compute half of this PR landed on I'm keeping this PR open for the rest: The layout looks right. All 2,306 nodes and alignment flags match the 6000.3.0f1, 6000.3.11f1 and 6000.3.20f1 dumps, and the 6000.3.0b4 dump matches Could you tell me:
If that checks out, please rebase this PR down to the Shader part and describe that build in the docs entry. Its failing sanitizer check isn't caused by your change: it was a host timing test that #779 has since removed, so a fresh run should clear it. |
|
Thanks for checking this, and for merging the compute half. You're right that the hash doesn't belong to the game. My commit message named the wrong application, sorry about that. My cartridge is the Midnight Edition (base game only, no update). It holds two applications, and the 6000.3 files come from the second one, the Digital Sound & Art Gallery, not from the game:
There's no patch meta on the cartridge; its update partition is only the firmware bundle. I also scanned all 3,025 of the game's Addressables bundles. All 3,508 serialized files in them are 2022.3.62f2, they hold 459 Shaders that all use So the game on my cartridge is older than your v1.1.0, but it's on the same Unity 2022.3.62f2 as your profile and needs neither 6000.3 layout. That's consistent with what you found. The 97 Shaders, 11 ComputeShaders, and 2,165 stage shaders in the PR all come from the Gallery. That's also how my first build ended up packing the Gallery: If you still want the Shader layout with the Gallery as its sample, I'll rebase this down to |
Requested by Tom
What and why
Castlevania: Belmont's Curse (game 0100BA4026E94000, on the 01005F4027E94000 cartridge, Unity 6000.3) keeps all 97 Shaders and 11 ComputeShaders in player files without type trees. None of its 368 Addressables bundles holds a Shader, so the split stopped at the built-in resources with "no bundle has a Shader type tree of the same hash to borrow". Shader version 4 (6000.3.0f1 and later) adds
m_AssetLocalIdentifierInFileafterm_AssetGUID. Each ComputeShader resource gains aresTypeafter its texture dimension.SHADER_6000_3andCOMPUTE_6000_3match AssetRipper's 6000.3 release dumps node for node, alignment flags included, and both hashes are inKNOWN_TREES.Checked
dm/gfx/tests/test_unity_*.pypass.test_unity_known_trees.pylists the two new hashes, andtest_unity_compute.pyreads a 6000.3 ComputeShader fixture through to shader_split.dm/tools/lint_python.pyreports 0 new findings.Docs
docs/reference/shaders.mdentry (Unity stripped trees list);docs_symptoms.pywas not needed, because no new entry heading was addedunityfs.pyfeeds the shader split, not the translation chain, sodmsh_chain.his unchanged🤖 Generated with Claude Code