You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
PlayStation texture deswizzle (no upstream reference yet) #130
#33 names "Switch / Xbox360 / PS4-style swizzle". Its PR does the Xbox 360 byte swap (AssetStudio) and the Switch deswizzle (UnityPy). PlayStation textures are not handled. Console builds can store them tiled, but neither AssetStudio nor UnityPy deswizzles PS4/PS5 (or PS Vita) textures. So there is no MIT upstream to port and no oracle to take goldens from (R12), and no fixture editor here can build for PlayStation either. If such a texture is tiled, it currently decodes as if it were stored linear.
This is on-demand work, like the other game/console items in M6+. Start it only when there is a real consumer, and a reference to port that is MIT or compatibly licensed.
Tasks
Find a permissively licensed PS4/PS5 texture tiling reference and an oracle able to produce goldens for it
Until then, consider whether a PlayStation texture should throw UnsupportedError rather than decode as linear (R9)
Acceptance
A PS4 texture decodes to the same RGBA as the chosen oracle, or is refused with UnsupportedError
Plan: docs/unity-asset-reader-plan.md. Behavior source of truth: Razviar/assetstudio (MIT). Golden oracle: UnityPy (MIT). MIT-derivative port: keep upstream copyright notices. Do not copy or import @arkntools/unity-js (AGPL-3.0), tests included. No C# compiled to WASM - C# is reference only, hand-ported to TS; WASM is built from C/C++ only (plan D2). Layout: npm-workspaces monorepo under packages/; dependencies point feature package -> core only (plan D7/D8, rules R13/R14).
Update from #131, following the maintainer's decision: the third task is decided and done. decodeTexture2D now throws UnsupportedError("texture platform", …) for any BuildTarget.PS4 (31) or BuildTarget.PS5 (44) texture (R9), in refuseTiledPlatform in packages/texture/src/platform.ts (commit e10db76). It refuses linear PlayStation textures too, since nothing in the file tells them apart from tiled ones. PS3 and PS Vita are not refused. When this issue lands, detiling replaces that refusal; the test to update is platform.test.ts › "PS4 and PS5 textures are refused until they can be detiled (#130, R9)".
Note from the re-review of PR #131: the PS4/PS5 refusal also blocks PS4 Crunch textures. A Crunch stream is unpacked on the CPU and cannot be stored tiled, so this issue could lift the refusal for Crunch formats first.
Activity
Refuse PS4 and PS5 textures until #130
fatal10110 commentedon Sep 27, 2026
Update from #131, following the maintainer's decision: the third task is decided and done.
decodeTexture2Dnow throwsUnsupportedError("texture platform", …)for anyBuildTarget.PS4(31) orBuildTarget.PS5(44) texture (R9), inrefuseTiledPlatforminpackages/texture/src/platform.ts(commit e10db76). It refuses linear PlayStation textures too, since nothing in the file tells them apart from tiled ones. PS3 and PS Vita are not refused. When this issue lands, detiling replaces that refusal; the test to update isplatform.test.ts› "PS4 and PS5 textures are refused until they can be detiled (#130, R9)".Platform byte-swaps and vertical flip (#33) (#131)
fatal10110 commentedon Sep 27, 2026
Note from the re-review of PR #131: the PS4/PS5 refusal also blocks PS4 Crunch textures. A Crunch stream is unpacked on the CPU and cannot be stored tiled, so this issue could lift the refusal for Crunch formats first.