Trixarian / NetherSX2-patch

Unofficial Patches for NetherSX2
https://discord.gg/6cGWCrqAw5
The Unlicense
639 stars 28 forks source link

No support for .DDS texture replacement? #40

Open VorgonBattlecruiser opened 5 months ago

VorgonBattlecruiser commented 5 months ago

Im playing Final Fantasy X International (SLPS-25088) and wanted to enable a texture replacement mod for that version specifically in the .DDS format. Path: This PC\Xiaoxin Pad Pro 2021\Internal shared storage\Android\data\xyz.aethersx2.android\files\textures\SLPS-25088\replacements

Even when enabling loading textures and asynchronous loading of those textures it does not work. No visual change can be detected over multiple restarts, loads etc.

Google search did not lead me to any solution, so maybe the experts here know more.

Trixarian commented 5 months ago

If I had to guess, it's the size. 49GB of junk textures is too much, so the emulator just doesn't load it. PCSX2 should really fix that dumping issue

VorgonBattlecruiser commented 5 months ago

the textures are a bit over 8gb iirc, my ram on my tablet is 6gb, does that perhaps matter?

Trixarian commented 5 months ago

It shouldn't with asynchronous loading. Although there's a limit to how large of a texture pack it'll support. With the amount of junk textures this game still produces, what it upscale will be very hit or miss since even the 49GB texture pack doesn't always upscales some textures on the screen. This is an issue with PCSX2 that they still have to fix, although with them considering Texture Packs the same as piracy, that's unlikely to happen any time soon

leira commented 4 months ago

I just reported a similar issue as @VorgonBattlecruiser met, with the texture pack of Xenosaga 3. The texture pack was applied, but graphics didn change much.

@Trixarian I didn't follow what exactly is the problem here. Is it:

  1. NetherSX2/AetherSX2 doesn't support .DDS textures?
  2. The texture pack is too large to load? (The Xenosaga 3 texture pack is around 4GB, my tablet has 12GB ram.) But I suppose the textures are loaded individually, rather than have to be loaded entirely in the ram.
  3. Some thing to do with PCSX2? I didn't follow this one.

Can you please clarify? What's can we about it? Is it something can be addressed as a patch without accessing AetherSX2 source code?

Thanks!

Trixarian commented 4 months ago
  1. NetherSX2/AetherSX2 doesn't support .DDS textures

It does. Talh even added in support for BC7 texture compression for devices that don't support it (like Mali and some older Adreno devices). The issue with texture packs has more to do with the type of texture compression used than the format since support is all over the place and severely lacking with Mali - although all of them do support ASTC texture compression nicely

  1. The texture pack is too large to load? (The Xenosaga 3 texture pack is around 4GB, my tablet has 12GB ram.) But I suppose the textures are loaded individually, rather than have to be loaded entirely in the ram.

In testing, it's less to do with the size of the pack (although that can play a part) and more to do with the /amount/ of textures. It took me an hour and half to decompress a zip file with the 40k+ files to get it on my phone - and that's just for the first disc. The textures are compressed, so NetherSX2 needs to decompress them so it can use them. Now imagine if it tries to do that for 40k textures before the game starts. It may end up timing out the process if it takes too long, leaving you with an incomplete set of upscaled textures to use. Although that's more speculation than actual fact. It could also just be the texture replacement system trying to be optimal and intentionally ignoring textures that make little impact visually

  1. Some thing to do with PCSX2? I didn't follow this one.

For many games, PCSX2 dumps textures badly. This results in duplicate and/or corrupted textures that are required to be used to make an texture pack work, but it also quickly eats video memory due to the sheer number of them. The fact this pack has over 40k textures (when most games have around 10k) tells me that this may be the case with Final Fantasy X International and Xenosaga 3.

Aa a side note, the HD texture pack does work: Default: Screenshot_2024-02-24-03-40-51-802_xyz aethersx2 android

HD Texture pack: Screenshot_2024-02-24-03-40-16-754_xyz aethersx2 android

Note the difference between the sharpness of the lines on top and below

leira commented 4 months ago

Thanks for the explanation!