Skip to content

packing: Unreal Engine 4.27 shaders for the Switch 2 (Persona 3 Reload): audio paks, LSLG with NVN2 control sections, ray tracing records - #2653

Open
FifteenPen wants to merge 3 commits into
seedds:mainfrom
FifteenPen:pr/ue-switch2-inline-shaders
Open

FifteenPen wants to merge 3 commits into
seedds:mainfrom
FifteenPen:pr/ue-switch2-inline-shaders

Conversation

@FifteenPen

Copy link
Copy Markdown
Contributor

Three fixes in reading Unreal Engine 4.27 shaders for the Switch 2, found on Persona 3 Reload (040091C0232EE000, project xrd777, IoStore, shader format SF_GLSL_SAGE). Its shaders are inline in the cooked packages in its IoStore containers, as in Mario & Luigi: Brothership.

  • packing/uepak: pakchunk1, 2 and 4 hold only audio and fonts (.awb, .usm, .ufont). inline_shaders took any pak without inline shaders for one with shader code archives, so the NSP script's decode step searched those paks for archives, found none, and stopped. A pak that names no shader code archive, cooked package or global shader cache now holds neither kind (None, like an empty pak). When no pak has archives but some have inline shaders, the decode step says so and goes on to the split.
  • packing/split: SF_GLSL_SAGE records are LSLG records, as on the Switch, but with an NVN2 control section (version 0xc9), whose code length is at +0x44 rather than +0x704. uepak.lslg reads both. Before this, every one of the game's 3,429 shader files was rejected.
  • packing/split: the global shader cache holds ray tracing records (stage tags S1–S3, e.g. FDefaultMainCHS) that NVN has no stage for. The first one made the whole file unreadable, every global shader with it (the UI's among them, so the game's dialogs and menus didn't draw). They are now left out.

Tests in test_uepak_iostore.py cover each. The game's profile comes in a separate PR.

…3 Reload's build takes its inline shaders instead of stopping at the decode step
…re left out, so Persona 3 Reload's global shaders, its UI's among them, are read
@github-actions github-actions Bot added packing Building an IPA or a Mac app: the NSP script, extraction, the shader split, the packers tools Tools and scripts (dm/tools, scripts) labels Nov 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

packing Building an IPA or a Mac app: the NSP script, extraction, the shader split, the packers tools Tools and scripts (dm/tools, scripts)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant