dolphin
dolphin copied to clipboard
VideoCommon: support specifying the texture compression level
I kind of question the need for this but a user asked for it and currently uses a workaround. This does now match our frame dump configuration, so I guess there's that.
Fixes https://bugs.dolphin-emu.org/issues/12963
Note there is a breaking change, as this PR renames the frame dump setting to be more specific (as there is now more than one thing that can be compressed). I prefer breaking changes if they clean things up but if the dev team prefers to keep it as is, I can revert that.
This isn’t absolutely needed but it can help in some situations where the texture dump is the size of the full frame (1x) like FMV’s and especially when a texture is dynamically generated and full frame. This is especially prevalent in Metroid Prime 1 & 2 where it generates a static overlay. There’s no way to catch them all since the hashes will be different every time.
Example before and after:
https://user-images.githubusercontent.com/126473/176155241-7fa0ddb4-120f-44f7-8202-42a469f33e97.mp4
It can also help when there’s a large quantity being dumped at once. MP 2 suffers from this with the portals. Again, procedurally generated and endless hashes.
Playing through the game while dumping and not making it tedious is a big user experience improvement. I haven’t even mentioned all instances where these slowdowns occur but it’s quite frequent in enemy encounters.
Here’s what the setting looks like on my end:
Tried with --config=Graphics.Settings.TexturePNGCompressionLevel=0
through the command line (how i’ll be using it) and works as expected.
Thanks for working on this!
I'm not sure whether this really needs two separate UI options, or even two separate INI options... Is there a good reason to not just connect the existing compression level setting to dumped textures?
@AdmiralCurtiss - yeah, I thought of that originally. The biggest reason was that from a UI perspective. It's strange to have it in either frame dumping or texture dumping if it applies to both. I mean we could have one UI that technically tweaks the same value under the hood but wasn't sure if I liked that. Or we could put this in a different section ("Misc"?).
The other reason is they are different capabilities which means a user might not want the same setting for both. But that's more minor.
Also, as I mentioned, I do question whether this is needed at all. The user above is the one that requested this feature and at least as far as I can tell they are using it to get around the dynamic texture generation Metroid Prime does for some of its textures. I'm currently working on a new feature (with a new UI) that might impact how users deal with textures, so if the sole reason is for the dynamic textures, maybe we should wait to merge this until after that feature is done to see if this compression setting is still desired.
Then again, this compression setting won't ever hurt anything so if you see a way around the UI, I don't mind merging this.
Personally, I don’t like having every underlying feature exposed in the UI. As long as the ini key/command line option is documented, it should satisfy more savvy users.
I can keep compiling a custom build since it seems to bother no one else and it bothers me a lot. lol
Yeah, I'm usually of the opposite mindset. I feel like exposing to the UI is often the right way to go but it becomes a content problem. Figuring out how to present the UI so it is intuitive and doesn't clutter the existing controls can be a challenge.
That being said, this is so specialized I'd be ok with merging it into one setting...or having it be INI only if we keep it as a separate setting. Or wait for my new change to make a decision.
I don't think there's any rush to merge this.
Nearing almost a year since this was opened and there's been little requests for this. If there is demand, I will reopen and rebase at that point.
I still use it. I simplified it after merge conflicts (no GUI access). In case anyone ever runs into this, it’s over here: https://github.com/dvessel/dolphin/tree/texdump-compression
Not much demand for it but there aren’t many dumping textures and aware of this work around.
fwiw If you want to open a PR for just the INI setting I see no reason to not just merge it.