duckstation icon indicating copy to clipboard operation
duckstation copied to clipboard

GPU: Implement texture dumping and replacement

Open stenzek opened this issue 3 years ago • 5 comments

This is still a work in progress, but I'm PR'ing it so anyone interested can mess with it.

Rough TODO:

  • [x] Support dumping by VRAM write and clut/palette.
  • [x] Support replacing textures.
  • [ ] Improve dumping further and reduce the number of junk textures (it's much better than the initial version, but there's still room for improvement.
  • [x] Implement on backends other than DX11.
  • [x] Make sure it doesn't crash the software renderer.
  • [ ] Save texture replacement state to save state (at the moment it will be lost when you load state).
  • [ ] Save texture dumper state to save state (same as replacements, it's lost when loading).
  • [ ] Texture filtering options for the replacements (mipmaps/trilinear).

NOTE: This is a completely different/original implementation when compared to the functionality in beetle-psx. Texture packs created for it are not, and never will be compatible.

Settings: img

Some initial results: https://cdn.discordapp.com/attachments/792256355280355336/848559538672369664/Tomb_Raider_USA_2021-05-30_23-51-10.mp4 https://cdn.discordapp.com/attachments/695640472202379428/848895332749148190/Castlevania_-_Symphony_of_the_Night_USA_2021-05-30_19-47-52.mp4

img img img img img img img img

stenzek avatar Jun 05 '21 12:06 stenzek

Suggestions:

  • Shortcuts to enable and disable texture replacement i.e: F11 - To turn On and Off on the go will be great to save time while testing and see the results.

  • Tooltips: There are too many options in Texture Replacement Settings menu I'm not sure what all of those do so my suggestion is to create some tooltips on mouse hover, to briefly shortly which one does what, not all, only the category group is for will be okay-ish.

andercard0 avatar Jun 05 '21 13:06 andercard0

Turning it off and on at runtime isn't possible - it needs the VRAM upload as it happens. You could temporarily disable it, but fully disabling would not be recoverable.

The dumping options aren't meant for users who don't know what they're doing. That's why it's in a separate dialog away from the other settings. I'll document it on the wiki some time.

stenzek avatar Jun 05 '21 13:06 stenzek

The dumping options aren't meant for users who don't know what they're doing. That's why it's in a separate dialog away from the other settings. I'll document it on the wiki some time.

Cool then, what would be great!

so, please consider a shortcut to open the texture replacement menu maybe :p

andercard0 avatar Jun 05 '21 13:06 andercard0

open dump directory button isn't opening, just dump and change some here ~~where should i put those~~ nvm figured out should be in \textures\SlusXX i guess

andercard0 avatar Jun 05 '21 14:06 andercard0

Super excited when I heard about this, thank you so much for your hard work!

tvhung83 avatar Sep 23 '21 10:09 tvhung83