Repository navigation
AssetStudio cross-check for the 6000.6 variant atlas sprites #230
Description
Package: packages/texture (npm unity-asset-reader-texture) tests; scripts/cross-check-fixture-oracles.py
Description
Follow-up of #229. The 6000.6.4f1 variant/sprites fixture's half atlas has two packed sprites (r_a, r_b) with downscaleMultiplier 0.5 on a 32x32 texture. #229 cuts them with the #153 resize, which matches AssetStudio's executed CutImage to the byte on the 2019.4 variant, but there is no byte-exact reference for these 6000.6 entries: UnityPy ignores the multiplier, and the 2019.4 cross-check (fixtures/assetstudio-fixture-cross-checks.json) does not apply because the 6000.6 variant texture's pixels differ from 2019.4's (256 of 1024 pixels). #229 checks them for AssetStudio's size, for the resize being applied (r_a lies outside the unscaled texture), and for being within 1.5 per channel (mean, opaque interior) of the full-scale master atlas' crop of the same sprite. The environment #229 was made in had no .NET SDK to run the harness.
Tasks
- Let
scripts/cross-check-fixture-oracles.pytake the 6000.6 variant's inputs (texture bytes,textureRect,textureRectOffset,settingsRaw,downscaleMultiplierperm_RenderDataMapentry; read with UnityPy 1.25.4, which reads format 23), and run the pinnedCutImageon them in the external .NET 8 harness (fixtures/BUILDING.mdsection 15), outside the repo (R2). - Attach the summaries to the variant entries of
packedSpritesinmodern-goldens.json(make-modern-goldens.py), matched on their input metadata asmake-goldens.pydoes for 2019.4. - Replace the closeness check in
packages/texture/tests/sprite-6000-6.test.tswith the byte-exact one.
Acceptance
- The 6000.6 variant's
r_aandr_bdecode to AssetStudio's executedCutImageimage, to the byte.
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).
Activity