I had thought to do some processing on the textures in a game recently, but ran into a really annoying problem right from the start. While I could extract the textures easily enough, they were swizzled for the Switch (or specifically for Tegra of course.) Interestingly enough it seems to be insanely hard to actually find anything out there to unswizzle Switch textures -- which is extremely strange because the actual mechanisms are well known with a lot of open source implementations in a lot of different projects. As I googled around I found several open source projects -- all of which have no releases and you're supposed to compile yourself with your fingers crossed as developers seem to have just tossed the code up then forgotten about it (so it may or may not even work with modern implementations.) I don't really know how to do that with most of them (I'm not a programmer) and if it doesn't just build from make in Linux/MSYS2/etc I can't do much with it. Especially one I ran into that is made in Rust, which I don't even know how to work with at all. Interestingly I see that there is code enough that stuff like Switch Toolbox can come with their own separate swizzle DLLs, so in theory at least such a thing could easily translate to a program designed to actually do that. Naturally Switch Toolbox won't actually let a user manually unswizzle a texture of course. (That would be too easy!) One post I ran across even tells people to write their own program to send the texture data to the code for unswizzling (I definitely can't do that!)
Of course a lot of tutorials deal with swizzling textures for the Switch. Most just use an old Noesis plugin which, interestingly enough, can swizzle textures, but refuses to unswizzle them even though it has a command specifically to do so. The swizzle command the tutorials reference is -ue4texungob. There is a -ue4texgob command too which you would think would mean the opposite. However, it means the same thing according to the --help reference. Interestingly, if you use -ue4texgob it just does nothing to a swizzled texture (not only does it not unswizzle, but the output is exactly the same as the original -- if it actually were swizzling it should produce a newly swizzled texture even more crazy than before, so instead it's apparently just doing nothing.)
So far the only mechanism I've been able to find is there is a program called "rawtex" which is designed to work with raw texture files. Unfortunately, the author seems to not be interested in doing any further development on it and never even bothered to make command line versions of either other unswizzle version (why they did a separate specific version instead of just having command line parameters is beyond me) and the software is very limited and can't really batch process Switch files (only PS4 since that's the only command line version they made for unswizzling.) Also, it doesn't work with non-raw files like PNGs/etc. In fact, I couldn't figure out how to produce an appropriate raw file for it to use on purpose. I was working with a Unity game, so I was able to just extract the texture raw via Unity Asset Studio and that worked, but if I tried something like saving the PNG as a raw image file via image viewer or editor the program couldn't work on it (or at least if it could I couldn't figure out how since even manually specifying resolution and format didn't work.) That's obviously a problem with anything where you can't extract the source raw like that such as basically anything else.
Is there really not just any simple program out there that can just simply take a PNG/whatever and unswizzle it -- preferably without jumping through a bunch of hoops to get there? If it could do both that would be especially great since the Noesis plugin is only intended to work with Unreal asset files so is a real pita to use.
Of course a lot of tutorials deal with swizzling textures for the Switch. Most just use an old Noesis plugin which, interestingly enough, can swizzle textures, but refuses to unswizzle them even though it has a command specifically to do so. The swizzle command the tutorials reference is -ue4texungob. There is a -ue4texgob command too which you would think would mean the opposite. However, it means the same thing according to the --help reference. Interestingly, if you use -ue4texgob it just does nothing to a swizzled texture (not only does it not unswizzle, but the output is exactly the same as the original -- if it actually were swizzling it should produce a newly swizzled texture even more crazy than before, so instead it's apparently just doing nothing.)
So far the only mechanism I've been able to find is there is a program called "rawtex" which is designed to work with raw texture files. Unfortunately, the author seems to not be interested in doing any further development on it and never even bothered to make command line versions of either other unswizzle version (why they did a separate specific version instead of just having command line parameters is beyond me) and the software is very limited and can't really batch process Switch files (only PS4 since that's the only command line version they made for unswizzling.) Also, it doesn't work with non-raw files like PNGs/etc. In fact, I couldn't figure out how to produce an appropriate raw file for it to use on purpose. I was working with a Unity game, so I was able to just extract the texture raw via Unity Asset Studio and that worked, but if I tried something like saving the PNG as a raw image file via image viewer or editor the program couldn't work on it (or at least if it could I couldn't figure out how since even manually specifying resolution and format didn't work.) That's obviously a problem with anything where you can't extract the source raw like that such as basically anything else.
Is there really not just any simple program out there that can just simply take a PNG/whatever and unswizzle it -- preferably without jumping through a bunch of hoops to get there? If it could do both that would be especially great since the Noesis plugin is only intended to work with Unreal asset files so is a real pita to use.
Last edited by Nazosan,